Alibaba Cloud

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

getApplications

This data source provides the Oos Applications of the current Alibaba Cloud user.

NOTE: Available in v1.145.0+.

Example Usage

Basic Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Oos.GetApplications.InvokeAsync());
        this.OosApplicationId1 = ids.Apply(ids => ids.Applications?[0]?.Id);
        var nameRegex = Output.Create(AliCloud.Oos.GetApplications.InvokeAsync(new AliCloud.Oos.GetApplicationsArgs
        {
            NameRegex = "^my-Application",
        }));
        this.OosApplicationId2 = nameRegex.Apply(nameRegex => nameRegex.Applications?[0]?.Id);
    }

    [Output("oosApplicationId1")]
    public Output<string> OosApplicationId1 { get; set; }
    [Output("oosApplicationId2")]
    public Output<string> OosApplicationId2 { get; set; }
}
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 {
		ids, err := oos.GetApplications(ctx, nil, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosApplicationId1", ids.Applications[0].Id)
		nameRegex, err := oos.GetApplications(ctx, &oos.GetApplicationsArgs{
			NameRegex: pulumi.StringRef("^my-Application"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosApplicationId2", nameRegex.Applications[0].Id)
		return nil
	})
}
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.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 ids = OosFunctions.getApplications();

        ctx.export("oosApplicationId1", ids.applyValue(getApplicationsResult -> getApplicationsResult.applications()[0].id()));
        final var nameRegex = OosFunctions.getApplications(GetApplicationsArgs.builder()
            .nameRegex("^my-Application")
            .build());

        ctx.export("oosApplicationId2", nameRegex.applyValue(getApplicationsResult -> getApplicationsResult.applications()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.oos.get_applications()
pulumi.export("oosApplicationId1", ids.applications[0].id)
name_regex = alicloud.oos.get_applications(name_regex="^my-Application")
pulumi.export("oosApplicationId2", name_regex.applications[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.oos.getApplications({});
export const oosApplicationId1 = ids.then(ids => ids.applications?[0]?.id);
const nameRegex = alicloud.oos.getApplications({
    nameRegex: "^my-Application",
});
export const oosApplicationId2 = nameRegex.then(nameRegex => nameRegex.applications?[0]?.id);
variables:
  ids:
    Fn::Invoke:
      Function: alicloud:oos:getApplications
      Arguments: {}
  nameRegex:
    Fn::Invoke:
      Function: alicloud:oos:getApplications
      Arguments:
        nameRegex: ^my-Application
outputs:
  oosApplicationId1: ${ids.applications[0].id}
  oosApplicationId2: ${nameRegex.applications[0].id}

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,
                     tags: Optional[Mapping[str, Any]] = 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,
                     tags: Optional[pulumi.Input[Mapping[str, Any]]] = 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:oos/getApplications:getApplications
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of Application IDs. Its element value is same as Application Name.

NameRegex string

A regex string to filter results by Application name.

OutputFile string
Tags Dictionary<string, object>

The tag of the resource.

Ids []string

A list of Application IDs. Its element value is same as Application Name.

NameRegex string

A regex string to filter results by Application name.

OutputFile string
Tags map[string]interface{}

The tag of the resource.

ids List<String>

A list of Application IDs. Its element value is same as Application Name.

nameRegex String

A regex string to filter results by Application name.

outputFile String
tags Map<String,Object>

The tag of the resource.

ids string[]

A list of Application IDs. Its element value is same as Application Name.

nameRegex string

A regex string to filter results by Application name.

outputFile string
tags {[key: string]: any}

The tag of the resource.

ids Sequence[str]

A list of Application IDs. Its element value is same as Application Name.

name_regex str

A regex string to filter results by Application name.

output_file str
tags Mapping[str, Any]

The tag of the resource.

ids List<String>

A list of Application IDs. Its element value is same as Application Name.

nameRegex String

A regex string to filter results by Application name.

outputFile String
tags Map<Any>

The tag of the resource.

getApplications Result

The following output properties are available:

Applications List<Pulumi.AliCloud.Oos.Outputs.GetApplicationsApplication>
Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
NameRegex string
OutputFile string
Tags Dictionary<string, object>
Applications []GetApplicationsApplication
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
NameRegex string
OutputFile string
Tags map[string]interface{}
applications List<GetApplicationsApplication>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
nameRegex String
outputFile String
tags Map<String,Object>
applications GetApplicationsApplication[]
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
nameRegex string
outputFile string
tags {[key: string]: any}
applications Sequence[GetApplicationsApplication]
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
name_regex str
output_file str
tags Mapping[str, Any]
applications List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
nameRegex String
outputFile String
tags Map<Any>

Supporting Types

GetApplicationsApplication

ApplicationName string

The name of the application.

CreateTime string

The Created time of the application.

Description string

Application group description information.

Id string

The ID of the Application. The value is formate as <application_name>.

ResourceGroupId string

The ID of the resource group.

Tags Dictionary<string, object>

The tag of the resource.

UpdateTime string

The Updated time of the application.

ApplicationName string

The name of the application.

CreateTime string

The Created time of the application.

Description string

Application group description information.

Id string

The ID of the Application. The value is formate as <application_name>.

ResourceGroupId string

The ID of the resource group.

Tags map[string]interface{}

The tag of the resource.

UpdateTime string

The Updated time of the application.

applicationName String

The name of the application.

createTime String

The Created time of the application.

description String

Application group description information.

id String

The ID of the Application. The value is formate as <application_name>.

resourceGroupId String

The ID of the resource group.

tags Map<String,Object>

The tag of the resource.

updateTime String

The Updated time of the application.

applicationName string

The name of the application.

createTime string

The Created time of the application.

description string

Application group description information.

id string

The ID of the Application. The value is formate as <application_name>.

resourceGroupId string

The ID of the resource group.

tags {[key: string]: any}

The tag of the resource.

updateTime string

The Updated time of the application.

application_name str

The name of the application.

create_time str

The Created time of the application.

description str

Application group description information.

id str

The ID of the Application. The value is formate as <application_name>.

resource_group_id str

The ID of the resource group.

tags Mapping[str, Any]

The tag of the resource.

update_time str

The Updated time of the application.

applicationName String

The name of the application.

createTime String

The Created time of the application.

description String

Application group description information.

id String

The ID of the Application. The value is formate as <application_name>.

resourceGroupId String

The ID of the resource group.

tags Map<Any>

The tag of the resource.

updateTime String

The Updated time of the application.

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.