Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.cms.getSlsGroups
Explore with Pulumi AI
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
orsls_group_description
of the Sls Group. - Name
Regex string - A regex string to filter results by Sls Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview
). - Page
Number int - Page
Size 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
orsls_group_description
of the Sls Group. - Name
Regex string - A regex string to filter results by Sls Group name.
- Output
File string - 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
orsls_group_description
of the Sls Group. - name
Regex String - A regex string to filter results by Sls Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size 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
orsls_group_description
of the Sls Group. - name
Regex string - A regex string to filter results by Sls Group name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size 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
orsls_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
orsls_group_description
of the Sls Group. - name
Regex String - A regex string to filter results by Sls Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number
getSlsGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Cms. Outputs. Get Sls Groups Group> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Keyword string
- Name
Regex string - Output
File string - Page
Number int - Page
Size int
- Groups
[]Get
Sls Groups Group - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Keyword string
- Name
Regex string - Output
File string - Page
Number int - Page
Size int
- groups
List<Get
Sls Groups Group> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- keyword String
- name
Regex String - output
File String - page
Number Integer - page
Size Integer
- groups
Get
Sls Groups Group[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- keyword string
- name
Regex string - output
File string - page
Number number - page
Size number
- groups
Sequence[Get
Sls Groups Group] - 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
- name
Regex String - output
File String - page
Number Number - page
Size Number
Supporting Types
GetSlsGroupsGroup
- Create
Time string - The creation time of the resource.
- Id string
- The ID of the Sls Group. Its value is same as Queue Name.
- Sls
Group List<Pulumi.Configs Ali Cloud. Cms. Inputs. Get Sls Groups Group Sls Group Config> - The Config of the Sls Group.
- Sls
Group stringDescription - The Description of the Sls Group.
- Sls
Group stringName - The name of the resource.
- Create
Time string - The creation time of the resource.
- Id string
- The ID of the Sls Group. Its value is same as Queue Name.
- Sls
Group []GetConfigs Sls Groups Group Sls Group Config - The Config of the Sls Group.
- Sls
Group stringDescription - The Description of the Sls Group.
- Sls
Group stringName - The name of the resource.
- create
Time String - The creation time of the resource.
- id String
- The ID of the Sls Group. Its value is same as Queue Name.
- sls
Group List<GetConfigs Sls Groups Group Sls Group Config> - The Config of the Sls Group.
- sls
Group StringDescription - The Description of the Sls Group.
- sls
Group StringName - The name of the resource.
- create
Time string - The creation time of the resource.
- id string
- The ID of the Sls Group. Its value is same as Queue Name.
- sls
Group GetConfigs Sls Groups Group Sls Group Config[] - The Config of the Sls Group.
- sls
Group stringDescription - The Description of the Sls Group.
- sls
Group stringName - 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_ Sequence[Getconfigs Sls Groups Group Sls Group Config] - The Config of the Sls Group.
- sls_
group_ strdescription - The Description of the Sls Group.
- sls_
group_ strname - The name of the resource.
- create
Time String - The creation time of the resource.
- id String
- The ID of the Sls Group. Its value is same as Queue Name.
- sls
Group List<Property Map>Configs - The Config of the Sls Group.
- sls
Group StringDescription - The Description of the Sls Group.
- sls
Group StringName - The name of the resource.
GetSlsGroupsGroupSlsGroupConfig
- Sls
Logstore string - The name of the Log Store.
- Sls
Project string - The name of the Project.
- Sls
Region string - The Sls Region.
- Sls
User stringId - The ID of the Sls User.
- Sls
Logstore string - The name of the Log Store.
- Sls
Project string - The name of the Project.
- Sls
Region string - The Sls Region.
- Sls
User stringId - The ID of the Sls User.
- sls
Logstore String - The name of the Log Store.
- sls
Project String - The name of the Project.
- sls
Region String - The Sls Region.
- sls
User StringId - The ID of the Sls User.
- sls
Logstore string - The name of the Log Store.
- sls
Project string - The name of the Project.
- sls
Region string - The Sls Region.
- sls
User stringId - 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_ strid - The ID of the Sls User.
- sls
Logstore String - The name of the Log Store.
- sls
Project String - The name of the Project.
- sls
Region String - The Sls Region.
- sls
User StringId - 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.