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

alicloud.cms.getSlsGroups

Explore with Pulumi AI

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

    This data source provides the Cms Sls Groups of the current Alibaba Cloud user.

    NOTE: Available in v1.171.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.cms.getSlsGroups({
        ids: ["example_id"],
    });
    export const cmsSlsGroupId1 = ids.then(ids => ids.groups?.[0]?.id);
    const nameRegex = alicloud.cms.getSlsGroups({
        nameRegex: "^my-SlsGroup",
    });
    export const cmsSlsGroupId2 = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.cms.get_sls_groups(ids=["example_id"])
    pulumi.export("cmsSlsGroupId1", ids.groups[0].id)
    name_regex = alicloud.cms.get_sls_groups(name_regex="^my-SlsGroup")
    pulumi.export("cmsSlsGroupId2", name_regex.groups[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := cms.GetSlsGroups(ctx, &cms.GetSlsGroupsArgs{
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("cmsSlsGroupId1", ids.Groups[0].Id)
    		nameRegex, err := cms.GetSlsGroups(ctx, &cms.GetSlsGroupsArgs{
    			NameRegex: pulumi.StringRef("^my-SlsGroup"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("cmsSlsGroupId2", 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.Cms.GetSlsGroups.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
        });
    
        var nameRegex = AliCloud.Cms.GetSlsGroups.Invoke(new()
        {
            NameRegex = "^my-SlsGroup",
        });
    
        return new Dictionary<string, object?>
        {
            ["cmsSlsGroupId1"] = ids.Apply(getSlsGroupsResult => getSlsGroupsResult.Groups[0]?.Id),
            ["cmsSlsGroupId2"] = nameRegex.Apply(getSlsGroupsResult => getSlsGroupsResult.Groups[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cms.CmsFunctions;
    import com.pulumi.alicloud.cms.inputs.GetSlsGroupsArgs;
    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 = CmsFunctions.getSlsGroups(GetSlsGroupsArgs.builder()
                .ids("example_id")
                .build());
    
            ctx.export("cmsSlsGroupId1", ids.applyValue(getSlsGroupsResult -> getSlsGroupsResult.groups()[0].id()));
            final var nameRegex = CmsFunctions.getSlsGroups(GetSlsGroupsArgs.builder()
                .nameRegex("^my-SlsGroup")
                .build());
    
            ctx.export("cmsSlsGroupId2", nameRegex.applyValue(getSlsGroupsResult -> getSlsGroupsResult.groups()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:cms:getSlsGroups
          Arguments:
            ids:
              - example_id
      nameRegex:
        fn::invoke:
          Function: alicloud:cms:getSlsGroups
          Arguments:
            nameRegex: ^my-SlsGroup
    outputs:
      cmsSlsGroupId1: ${ids.groups[0].id}
      cmsSlsGroupId2: ${nameRegex.groups[0].id}
    

    Using getSlsGroups

    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 getSlsGroups(args: GetSlsGroupsArgs, opts?: InvokeOptions): Promise<GetSlsGroupsResult>
    function getSlsGroupsOutput(args: GetSlsGroupsOutputArgs, opts?: InvokeOptions): Output<GetSlsGroupsResult>
    def get_sls_groups(ids: Optional[Sequence[str]] = None,
                       keyword: Optional[str] = None,
                       name_regex: Optional[str] = None,
                       output_file: Optional[str] = None,
                       page_number: Optional[int] = None,
                       page_size: Optional[int] = None,
                       opts: Optional[InvokeOptions] = None) -> GetSlsGroupsResult
    def get_sls_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       keyword: Optional[pulumi.Input[str]] = None,
                       name_regex: Optional[pulumi.Input[str]] = None,
                       output_file: Optional[pulumi.Input[str]] = None,
                       page_number: Optional[pulumi.Input[int]] = None,
                       page_size: Optional[pulumi.Input[int]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetSlsGroupsResult]
    func GetSlsGroups(ctx *Context, args *GetSlsGroupsArgs, opts ...InvokeOption) (*GetSlsGroupsResult, error)
    func GetSlsGroupsOutput(ctx *Context, args *GetSlsGroupsOutputArgs, opts ...InvokeOption) GetSlsGroupsResultOutput

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

    public static class GetSlsGroups 
    {
        public static Task<GetSlsGroupsResult> InvokeAsync(GetSlsGroupsArgs args, InvokeOptions? opts = null)
        public static Output<GetSlsGroupsResult> Invoke(GetSlsGroupsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSlsGroupsResult> getSlsGroups(GetSlsGroupsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cms/getSlsGroups:getSlsGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Sls Group IDs. Its element value is same as Sls Group Name.
    Keyword string
    The keywords of the sls_group_name or sls_group_description of the Sls Group.
    NameRegex string
    A regex string to filter results by Sls Group name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    Ids []string
    A list of Sls Group IDs. Its element value is same as Sls Group Name.
    Keyword string
    The keywords of the sls_group_name or sls_group_description of the Sls Group.
    NameRegex string
    A regex string to filter results by Sls Group name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    ids List<String>
    A list of Sls Group IDs. Its element value is same as Sls Group Name.
    keyword String
    The keywords of the sls_group_name or sls_group_description of the Sls Group.
    nameRegex String
    A regex string to filter results by Sls Group name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    ids string[]
    A list of Sls Group IDs. Its element value is same as Sls Group Name.
    keyword string
    The keywords of the sls_group_name or sls_group_description of the Sls Group.
    nameRegex string
    A regex string to filter results by Sls Group name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    ids Sequence[str]
    A list of Sls Group IDs. Its element value is same as Sls Group Name.
    keyword str
    The keywords of the sls_group_name or sls_group_description of the Sls Group.
    name_regex str
    A regex string to filter results by Sls Group name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    ids List<String>
    A list of Sls Group IDs. Its element value is same as Sls Group Name.
    keyword String
    The keywords of the sls_group_name or sls_group_description of the Sls Group.
    nameRegex String
    A regex string to filter results by Sls Group name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number

    getSlsGroups Result

    The following output properties are available:

    Groups List<Pulumi.AliCloud.Cms.Outputs.GetSlsGroupsGroup>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Names List<string>
    Keyword string
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    Groups []GetSlsGroupsGroup
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Keyword string
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    groups List<GetSlsGroupsGroup>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    keyword String
    nameRegex String
    outputFile String
    pageNumber Integer
    pageSize Integer
    groups GetSlsGroupsGroup[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    keyword string
    nameRegex string
    outputFile string
    pageNumber number
    pageSize number
    groups Sequence[GetSlsGroupsGroup]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    keyword str
    name_regex str
    output_file str
    page_number int
    page_size int
    groups List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    keyword String
    nameRegex String
    outputFile String
    pageNumber Number
    pageSize Number

    Supporting Types

    GetSlsGroupsGroup

    CreateTime string
    The creation time of the resource.
    Id string
    The ID of the Sls Group. Its value is same as Queue Name.
    SlsGroupConfigs List<Pulumi.AliCloud.Cms.Inputs.GetSlsGroupsGroupSlsGroupConfig>
    The Config of the Sls Group.
    SlsGroupDescription string
    The Description of the Sls Group.
    SlsGroupName string
    The name of the resource.
    CreateTime string
    The creation time of the resource.
    Id string
    The ID of the Sls Group. Its value is same as Queue Name.
    SlsGroupConfigs []GetSlsGroupsGroupSlsGroupConfig
    The Config of the Sls Group.
    SlsGroupDescription string
    The Description of the Sls Group.
    SlsGroupName string
    The name of the resource.
    createTime String
    The creation time of the resource.
    id String
    The ID of the Sls Group. Its value is same as Queue Name.
    slsGroupConfigs List<GetSlsGroupsGroupSlsGroupConfig>
    The Config of the Sls Group.
    slsGroupDescription String
    The Description of the Sls Group.
    slsGroupName String
    The name of the resource.
    createTime string
    The creation time of the resource.
    id string
    The ID of the Sls Group. Its value is same as Queue Name.
    slsGroupConfigs GetSlsGroupsGroupSlsGroupConfig[]
    The Config of the Sls Group.
    slsGroupDescription string
    The Description of the Sls Group.
    slsGroupName string
    The name of the resource.
    create_time str
    The creation time of the resource.
    id str
    The ID of the Sls Group. Its value is same as Queue Name.
    sls_group_configs Sequence[GetSlsGroupsGroupSlsGroupConfig]
    The Config of the Sls Group.
    sls_group_description str
    The Description of the Sls Group.
    sls_group_name str
    The name of the resource.
    createTime String
    The creation time of the resource.
    id String
    The ID of the Sls Group. Its value is same as Queue Name.
    slsGroupConfigs List<Property Map>
    The Config of the Sls Group.
    slsGroupDescription String
    The Description of the Sls Group.
    slsGroupName String
    The name of the resource.

    GetSlsGroupsGroupSlsGroupConfig

    SlsLogstore string
    The name of the Log Store.
    SlsProject string
    The name of the Project.
    SlsRegion string
    The Sls Region.
    SlsUserId string
    The ID of the Sls User.
    SlsLogstore string
    The name of the Log Store.
    SlsProject string
    The name of the Project.
    SlsRegion string
    The Sls Region.
    SlsUserId string
    The ID of the Sls User.
    slsLogstore String
    The name of the Log Store.
    slsProject String
    The name of the Project.
    slsRegion String
    The Sls Region.
    slsUserId String
    The ID of the Sls User.
    slsLogstore string
    The name of the Log Store.
    slsProject string
    The name of the Project.
    slsRegion string
    The Sls Region.
    slsUserId string
    The ID of the Sls User.
    sls_logstore str
    The name of the Log Store.
    sls_project str
    The name of the Project.
    sls_region str
    The Sls Region.
    sls_user_id str
    The ID of the Sls User.
    slsLogstore String
    The name of the Log Store.
    slsProject String
    The name of the Project.
    slsRegion String
    The Sls Region.
    slsUserId String
    The ID of the Sls User.

    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