1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. oos
  5. getApplicationGroups
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.oos.getApplicationGroups

Explore with Pulumi AI

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

NOTE: Available in v1.146.0+.

Example Usage

Basic Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.oos.getApplicationGroups({
    applicationName: "example_value",
    ids: [
        "my-ApplicationGroup-1",
        "my-ApplicationGroup-2",
    ],
});
export const oosApplicationGroupId1 = ids.then(ids => ids.groups?.[0]?.id);
const nameRegex = alicloud.oos.getApplicationGroups({
    applicationName: "example_value",
    nameRegex: "^my-ApplicationGroup",
});
export const oosApplicationGroupId2 = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.oos.get_application_groups(application_name="example_value",
    ids=[
        "my-ApplicationGroup-1",
        "my-ApplicationGroup-2",
    ])
pulumi.export("oosApplicationGroupId1", ids.groups[0].id)
name_regex = alicloud.oos.get_application_groups(application_name="example_value",
    name_regex="^my-ApplicationGroup")
pulumi.export("oosApplicationGroupId2", name_regex.groups[0].id)
Copy
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.GetApplicationGroups(ctx, &oos.GetApplicationGroupsArgs{
			ApplicationName: "example_value",
			Ids: []string{
				"my-ApplicationGroup-1",
				"my-ApplicationGroup-2",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosApplicationGroupId1", ids.Groups[0].Id)
		nameRegex, err := oos.GetApplicationGroups(ctx, &oos.GetApplicationGroupsArgs{
			ApplicationName: "example_value",
			NameRegex:       pulumi.StringRef("^my-ApplicationGroup"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("oosApplicationGroupId2", nameRegex.Groups[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Oos.GetApplicationGroups.Invoke(new()
    {
        ApplicationName = "example_value",
        Ids = new[]
        {
            "my-ApplicationGroup-1",
            "my-ApplicationGroup-2",
        },
    });

    var nameRegex = AliCloud.Oos.GetApplicationGroups.Invoke(new()
    {
        ApplicationName = "example_value",
        NameRegex = "^my-ApplicationGroup",
    });

    return new Dictionary<string, object?>
    {
        ["oosApplicationGroupId1"] = ids.Apply(getApplicationGroupsResult => getApplicationGroupsResult.Groups[0]?.Id),
        ["oosApplicationGroupId2"] = nameRegex.Apply(getApplicationGroupsResult => getApplicationGroupsResult.Groups[0]?.Id),
    };
});
Copy
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.oos.inputs.GetApplicationGroupsArgs;
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.getApplicationGroups(GetApplicationGroupsArgs.builder()
            .applicationName("example_value")
            .ids(            
                "my-ApplicationGroup-1",
                "my-ApplicationGroup-2")
            .build());

        ctx.export("oosApplicationGroupId1", ids.applyValue(getApplicationGroupsResult -> getApplicationGroupsResult.groups()[0].id()));
        final var nameRegex = OosFunctions.getApplicationGroups(GetApplicationGroupsArgs.builder()
            .applicationName("example_value")
            .nameRegex("^my-ApplicationGroup")
            .build());

        ctx.export("oosApplicationGroupId2", nameRegex.applyValue(getApplicationGroupsResult -> getApplicationGroupsResult.groups()[0].id()));
    }
}
Copy
variables:
  ids:
    fn::invoke:
      function: alicloud:oos:getApplicationGroups
      arguments:
        applicationName: example_value
        ids:
          - my-ApplicationGroup-1
          - my-ApplicationGroup-2
  nameRegex:
    fn::invoke:
      function: alicloud:oos:getApplicationGroups
      arguments:
        applicationName: example_value
        nameRegex: ^my-ApplicationGroup
outputs:
  oosApplicationGroupId1: ${ids.groups[0].id}
  oosApplicationGroupId2: ${nameRegex.groups[0].id}
Copy

Using getApplicationGroups

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 getApplicationGroups(args: GetApplicationGroupsArgs, opts?: InvokeOptions): Promise<GetApplicationGroupsResult>
function getApplicationGroupsOutput(args: GetApplicationGroupsOutputArgs, opts?: InvokeOptions): Output<GetApplicationGroupsResult>
Copy
def get_application_groups(application_name: Optional[str] = None,
                           deploy_region_id: Optional[str] = None,
                           ids: Optional[Sequence[str]] = None,
                           name_regex: Optional[str] = None,
                           output_file: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetApplicationGroupsResult
def get_application_groups_output(application_name: Optional[pulumi.Input[str]] = None,
                           deploy_region_id: Optional[pulumi.Input[str]] = None,
                           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[GetApplicationGroupsResult]
Copy
func GetApplicationGroups(ctx *Context, args *GetApplicationGroupsArgs, opts ...InvokeOption) (*GetApplicationGroupsResult, error)
func GetApplicationGroupsOutput(ctx *Context, args *GetApplicationGroupsOutputArgs, opts ...InvokeOption) GetApplicationGroupsResultOutput
Copy

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

public static class GetApplicationGroups 
{
    public static Task<GetApplicationGroupsResult> InvokeAsync(GetApplicationGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetApplicationGroupsResult> Invoke(GetApplicationGroupsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetApplicationGroupsResult> getApplicationGroups(GetApplicationGroupsArgs args, InvokeOptions options)
public static Output<GetApplicationGroupsResult> getApplicationGroups(GetApplicationGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:oos/getApplicationGroups:getApplicationGroups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ApplicationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Application.
DeployRegionId Changes to this property will trigger replacement. string
The region ID of the deployment.
Ids Changes to this property will trigger replacement. List<string>
A list of Application Group IDs. Its element value is same as Application Group Name.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Application Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ApplicationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Application.
DeployRegionId Changes to this property will trigger replacement. string
The region ID of the deployment.
Ids Changes to this property will trigger replacement. []string
A list of Application Group IDs. Its element value is same as Application Group Name.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Application Group name.
OutputFile string
File name where to save data source results (after running pulumi preview).
applicationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Application.
deployRegionId Changes to this property will trigger replacement. String
The region ID of the deployment.
ids Changes to this property will trigger replacement. List<String>
A list of Application Group IDs. Its element value is same as Application Group Name.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Application Group name.
outputFile String
File name where to save data source results (after running pulumi preview).
applicationName
This property is required.
Changes to this property will trigger replacement.
string
The name of the Application.
deployRegionId Changes to this property will trigger replacement. string
The region ID of the deployment.
ids Changes to this property will trigger replacement. string[]
A list of Application Group IDs. Its element value is same as Application Group Name.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Application Group name.
outputFile string
File name where to save data source results (after running pulumi preview).
application_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the Application.
deploy_region_id Changes to this property will trigger replacement. str
The region ID of the deployment.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Application Group IDs. Its element value is same as Application Group Name.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Application Group name.
output_file str
File name where to save data source results (after running pulumi preview).
applicationName
This property is required.
Changes to this property will trigger replacement.
String
The name of the Application.
deployRegionId Changes to this property will trigger replacement. String
The region ID of the deployment.
ids Changes to this property will trigger replacement. List<String>
A list of Application Group IDs. Its element value is same as Application Group Name.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Application Group name.
outputFile String
File name where to save data source results (after running pulumi preview).

getApplicationGroups Result

The following output properties are available:

ApplicationName string
Groups List<Pulumi.AliCloud.Oos.Outputs.GetApplicationGroupsGroup>
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
Names List<string>
DeployRegionId string
NameRegex string
OutputFile string
ApplicationName string
Groups []GetApplicationGroupsGroup
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
Names []string
DeployRegionId string
NameRegex string
OutputFile string
applicationName String
groups List<GetApplicationGroupsGroup>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
deployRegionId String
nameRegex String
outputFile String
applicationName string
groups GetApplicationGroupsGroup[]
id string
The provider-assigned unique ID for this managed resource.
ids string[]
names string[]
deployRegionId string
nameRegex string
outputFile string
application_name str
groups Sequence[GetApplicationGroupsGroup]
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
names Sequence[str]
deploy_region_id str
name_regex str
output_file str
applicationName String
groups List<Property Map>
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
names List<String>
deployRegionId String
nameRegex String
outputFile String

Supporting Types

GetApplicationGroupsGroup

ApplicationGroupName This property is required. string
The name of the Application group.
ApplicationName This property is required. string
The name of the Application.
CmsGroupId This property is required. string
The ID of the cloud monitor group.
CreateTime This property is required. string
The Creation time of the resource.
DeployRegionId This property is required. string
The region ID of the deployment.
Description This property is required. string
Application group description information.
Id This property is required. string
The ID of the Application Group. Its value is same as Queue Name.
ImportTagKey This property is required. string
Label key.
ImportTagValue This property is required. string
Label value.
UpdateTime This property is required. string
The Update time of the resource.
ApplicationGroupName This property is required. string
The name of the Application group.
ApplicationName This property is required. string
The name of the Application.
CmsGroupId This property is required. string
The ID of the cloud monitor group.
CreateTime This property is required. string
The Creation time of the resource.
DeployRegionId This property is required. string
The region ID of the deployment.
Description This property is required. string
Application group description information.
Id This property is required. string
The ID of the Application Group. Its value is same as Queue Name.
ImportTagKey This property is required. string
Label key.
ImportTagValue This property is required. string
Label value.
UpdateTime This property is required. string
The Update time of the resource.
applicationGroupName This property is required. String
The name of the Application group.
applicationName This property is required. String
The name of the Application.
cmsGroupId This property is required. String
The ID of the cloud monitor group.
createTime This property is required. String
The Creation time of the resource.
deployRegionId This property is required. String
The region ID of the deployment.
description This property is required. String
Application group description information.
id This property is required. String
The ID of the Application Group. Its value is same as Queue Name.
importTagKey This property is required. String
Label key.
importTagValue This property is required. String
Label value.
updateTime This property is required. String
The Update time of the resource.
applicationGroupName This property is required. string
The name of the Application group.
applicationName This property is required. string
The name of the Application.
cmsGroupId This property is required. string
The ID of the cloud monitor group.
createTime This property is required. string
The Creation time of the resource.
deployRegionId This property is required. string
The region ID of the deployment.
description This property is required. string
Application group description information.
id This property is required. string
The ID of the Application Group. Its value is same as Queue Name.
importTagKey This property is required. string
Label key.
importTagValue This property is required. string
Label value.
updateTime This property is required. string
The Update time of the resource.
application_group_name This property is required. str
The name of the Application group.
application_name This property is required. str
The name of the Application.
cms_group_id This property is required. str
The ID of the cloud monitor group.
create_time This property is required. str
The Creation time of the resource.
deploy_region_id This property is required. str
The region ID of the deployment.
description This property is required. str
Application group description information.
id This property is required. str
The ID of the Application Group. Its value is same as Queue Name.
import_tag_key This property is required. str
Label key.
import_tag_value This property is required. str
Label value.
update_time This property is required. str
The Update time of the resource.
applicationGroupName This property is required. String
The name of the Application group.
applicationName This property is required. String
The name of the Application.
cmsGroupId This property is required. String
The ID of the cloud monitor group.
createTime This property is required. String
The Creation time of the resource.
deployRegionId This property is required. String
The region ID of the deployment.
description This property is required. String
Application group description information.
id This property is required. String
The ID of the Application Group. Its value is same as Queue Name.
importTagKey This property is required. String
Label key.
importTagValue This property is required. String
Label value.
updateTime This property is required. String
The Update time of the resource.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.