1. Packages
  2. Alicloud Provider
  3. API Docs
  4. oos
  5. getApplicationGroups
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.oos.getApplicationGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    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}
    

    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>
    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]
    func GetApplicationGroups(ctx *Context, args *GetApplicationGroupsArgs, opts ...InvokeOption) (*GetApplicationGroupsResult, error)
    func GetApplicationGroupsOutput(ctx *Context, args *GetApplicationGroupsOutputArgs, opts ...InvokeOption) GetApplicationGroupsResultOutput

    > 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)
    }
    public static CompletableFuture<GetApplicationGroupsResult> getApplicationGroups(GetApplicationGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:oos/getApplicationGroups:getApplicationGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ApplicationName string
    The name of the Application.
    DeployRegionId string
    The region ID of the deployment.
    Ids List<string>
    A list of Application Group IDs. Its element value is same as Application Group Name.
    NameRegex 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 string
    The name of the Application.
    DeployRegionId string
    The region ID of the deployment.
    Ids []string
    A list of Application Group IDs. Its element value is same as Application Group Name.
    NameRegex 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 String
    The name of the Application.
    deployRegionId String
    The region ID of the deployment.
    ids List<String>
    A list of Application Group IDs. Its element value is same as Application Group Name.
    nameRegex 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 string
    The name of the Application.
    deployRegionId string
    The region ID of the deployment.
    ids string[]
    A list of Application Group IDs. Its element value is same as Application Group Name.
    nameRegex 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 str
    The name of the Application.
    deploy_region_id str
    The region ID of the deployment.
    ids Sequence[str]
    A list of Application Group IDs. Its element value is same as Application Group Name.
    name_regex 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 String
    The name of the Application.
    deployRegionId String
    The region ID of the deployment.
    ids List<String>
    A list of Application Group IDs. Its element value is same as Application Group Name.
    nameRegex 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 string
    The name of the Application group.
    ApplicationName string
    The name of the Application.
    CmsGroupId string
    The ID of the cloud monitor group.
    CreateTime string
    The Creation time of the resource.
    DeployRegionId string
    The region ID of the deployment.
    Description string
    Application group description information.
    Id string
    The ID of the Application Group. Its value is same as Queue Name.
    ImportTagKey string
    Label key.
    ImportTagValue string
    Label value.
    UpdateTime string
    The Update time of the resource.
    ApplicationGroupName string
    The name of the Application group.
    ApplicationName string
    The name of the Application.
    CmsGroupId string
    The ID of the cloud monitor group.
    CreateTime string
    The Creation time of the resource.
    DeployRegionId string
    The region ID of the deployment.
    Description string
    Application group description information.
    Id string
    The ID of the Application Group. Its value is same as Queue Name.
    ImportTagKey string
    Label key.
    ImportTagValue string
    Label value.
    UpdateTime string
    The Update time of the resource.
    applicationGroupName String
    The name of the Application group.
    applicationName String
    The name of the Application.
    cmsGroupId String
    The ID of the cloud monitor group.
    createTime String
    The Creation time of the resource.
    deployRegionId String
    The region ID of the deployment.
    description String
    Application group description information.
    id String
    The ID of the Application Group. Its value is same as Queue Name.
    importTagKey String
    Label key.
    importTagValue String
    Label value.
    updateTime String
    The Update time of the resource.
    applicationGroupName string
    The name of the Application group.
    applicationName string
    The name of the Application.
    cmsGroupId string
    The ID of the cloud monitor group.
    createTime string
    The Creation time of the resource.
    deployRegionId string
    The region ID of the deployment.
    description string
    Application group description information.
    id string
    The ID of the Application Group. Its value is same as Queue Name.
    importTagKey string
    Label key.
    importTagValue string
    Label value.
    updateTime string
    The Update time of the resource.
    application_group_name str
    The name of the Application group.
    application_name str
    The name of the Application.
    cms_group_id str
    The ID of the cloud monitor group.
    create_time str
    The Creation time of the resource.
    deploy_region_id str
    The region ID of the deployment.
    description str
    Application group description information.
    id str
    The ID of the Application Group. Its value is same as Queue Name.
    import_tag_key str
    Label key.
    import_tag_value str
    Label value.
    update_time str
    The Update time of the resource.
    applicationGroupName String
    The name of the Application group.
    applicationName String
    The name of the Application.
    cmsGroupId String
    The ID of the cloud monitor group.
    createTime String
    The Creation time of the resource.
    deployRegionId String
    The region ID of the deployment.
    description String
    Application group description information.
    id String
    The ID of the Application Group. Its value is same as Queue Name.
    importTagKey String
    Label key.
    importTagValue String
    Label value.
    updateTime 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.
    alicloud logo
    Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi