Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.actiontrail.getConsumerGroups
Explore with Pulumi AI
This data source provides a list of ALIKAFKA Consumer Groups in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.56.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const consumerGroupsDs = alicloud.actiontrail.getConsumerGroups({
instanceId: "xxx",
consumerIdRegex: "CID-alikafkaGroupDatasourceName",
outputFile: "consumerGroups.txt",
});
export const firstGroupName = consumerGroupsDs.then(consumerGroupsDs => consumerGroupsDs.consumerIds?.[0]);
import pulumi
import pulumi_alicloud as alicloud
consumer_groups_ds = alicloud.actiontrail.get_consumer_groups(instance_id="xxx",
consumer_id_regex="CID-alikafkaGroupDatasourceName",
output_file="consumerGroups.txt")
pulumi.export("firstGroupName", consumer_groups_ds.consumer_ids[0])
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/actiontrail"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
consumerGroupsDs, err := actiontrail.GetConsumerGroups(ctx, &actiontrail.GetConsumerGroupsArgs{
InstanceId: "xxx",
ConsumerIdRegex: pulumi.StringRef("CID-alikafkaGroupDatasourceName"),
OutputFile: pulumi.StringRef("consumerGroups.txt"),
}, nil)
if err != nil {
return err
}
ctx.Export("firstGroupName", consumerGroupsDs.ConsumerIds[0])
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var consumerGroupsDs = AliCloud.ActionTrail.GetConsumerGroups.Invoke(new()
{
InstanceId = "xxx",
ConsumerIdRegex = "CID-alikafkaGroupDatasourceName",
OutputFile = "consumerGroups.txt",
});
return new Dictionary<string, object?>
{
["firstGroupName"] = consumerGroupsDs.Apply(getConsumerGroupsResult => getConsumerGroupsResult.ConsumerIds[0]),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.actiontrail.ActiontrailFunctions;
import com.pulumi.alicloud.actiontrail.inputs.GetConsumerGroupsArgs;
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 consumerGroupsDs = ActiontrailFunctions.getConsumerGroups(GetConsumerGroupsArgs.builder()
.instanceId("xxx")
.consumerIdRegex("CID-alikafkaGroupDatasourceName")
.outputFile("consumerGroups.txt")
.build());
ctx.export("firstGroupName", consumerGroupsDs.applyValue(getConsumerGroupsResult -> getConsumerGroupsResult.consumerIds()[0]));
}
}
variables:
consumerGroupsDs:
fn::invoke:
Function: alicloud:actiontrail:getConsumerGroups
Arguments:
instanceId: xxx
consumerIdRegex: CID-alikafkaGroupDatasourceName
outputFile: consumerGroups.txt
outputs:
firstGroupName: ${consumerGroupsDs.consumerIds[0]}
Using getConsumerGroups
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 getConsumerGroups(args: GetConsumerGroupsArgs, opts?: InvokeOptions): Promise<GetConsumerGroupsResult>
function getConsumerGroupsOutput(args: GetConsumerGroupsOutputArgs, opts?: InvokeOptions): Output<GetConsumerGroupsResult>
def get_consumer_groups(consumer_id_regex: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
instance_id: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetConsumerGroupsResult
def get_consumer_groups_output(consumer_id_regex: Optional[pulumi.Input[str]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetConsumerGroupsResult]
func GetConsumerGroups(ctx *Context, args *GetConsumerGroupsArgs, opts ...InvokeOption) (*GetConsumerGroupsResult, error)
func GetConsumerGroupsOutput(ctx *Context, args *GetConsumerGroupsOutputArgs, opts ...InvokeOption) GetConsumerGroupsResultOutput
> Note: This function is named GetConsumerGroups
in the Go SDK.
public static class GetConsumerGroups
{
public static Task<GetConsumerGroupsResult> InvokeAsync(GetConsumerGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetConsumerGroupsResult> Invoke(GetConsumerGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetConsumerGroupsResult> getConsumerGroups(GetConsumerGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:actiontrail/getConsumerGroups:getConsumerGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Instance
Id string - ID of the ALIKAFKA Instance that owns the consumer groups.
- Consumer
Id stringRegex - A regex string to filter results by the consumer group id.
- Ids List<string>
- A list of ALIKAFKA Consumer Groups IDs, It is formatted to
<instance_id>:<consumer_id>
. - Output
File string - File name where to save data source results (after running
pulumi preview
).
- Instance
Id string - ID of the ALIKAFKA Instance that owns the consumer groups.
- Consumer
Id stringRegex - A regex string to filter results by the consumer group id.
- Ids []string
- A list of ALIKAFKA Consumer Groups IDs, It is formatted to
<instance_id>:<consumer_id>
. - Output
File string - File name where to save data source results (after running
pulumi preview
).
- instance
Id String - ID of the ALIKAFKA Instance that owns the consumer groups.
- consumer
Id StringRegex - A regex string to filter results by the consumer group id.
- ids List<String>
- A list of ALIKAFKA Consumer Groups IDs, It is formatted to
<instance_id>:<consumer_id>
. - output
File String - File name where to save data source results (after running
pulumi preview
).
- instance
Id string - ID of the ALIKAFKA Instance that owns the consumer groups.
- consumer
Id stringRegex - A regex string to filter results by the consumer group id.
- ids string[]
- A list of ALIKAFKA Consumer Groups IDs, It is formatted to
<instance_id>:<consumer_id>
. - output
File string - File name where to save data source results (after running
pulumi preview
).
- instance_
id str - ID of the ALIKAFKA Instance that owns the consumer groups.
- consumer_
id_ strregex - A regex string to filter results by the consumer group id.
- ids Sequence[str]
- A list of ALIKAFKA Consumer Groups IDs, It is formatted to
<instance_id>:<consumer_id>
. - output_
file str - File name where to save data source results (after running
pulumi preview
).
- instance
Id String - ID of the ALIKAFKA Instance that owns the consumer groups.
- consumer
Id StringRegex - A regex string to filter results by the consumer group id.
- ids List<String>
- A list of ALIKAFKA Consumer Groups IDs, It is formatted to
<instance_id>:<consumer_id>
. - output
File String - File name where to save data source results (after running
pulumi preview
).
getConsumerGroups Result
The following output properties are available:
- Consumer
Ids List<string> - Groups
List<Pulumi.
Ali Cloud. Action Trail. Outputs. Get Consumer Groups Group> - A list of consumer group. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Instance
Id string - The instance_id of the instance.
- Names List<string>
- A list of consumer group names.
- Consumer
Id stringRegex - Output
File string
- Consumer
Ids []string - Groups
[]Get
Consumer Groups Group - A list of consumer group. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Instance
Id string - The instance_id of the instance.
- Names []string
- A list of consumer group names.
- Consumer
Id stringRegex - Output
File string
- consumer
Ids List<String> - groups
List<Get
Consumer Groups Group> - A list of consumer group. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - The instance_id of the instance.
- names List<String>
- A list of consumer group names.
- consumer
Id StringRegex - output
File String
- consumer
Ids string[] - groups
Get
Consumer Groups Group[] - A list of consumer group. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- instance
Id string - The instance_id of the instance.
- names string[]
- A list of consumer group names.
- consumer
Id stringRegex - output
File string
- consumer_
ids Sequence[str] - groups
Sequence[Get
Consumer Groups Group] - A list of consumer group. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- instance_
id str - The instance_id of the instance.
- names Sequence[str]
- A list of consumer group names.
- consumer_
id_ strregex - output_
file str
- consumer
Ids List<String> - groups List<Property Map>
- A list of consumer group. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- instance
Id String - The instance_id of the instance.
- names List<String>
- A list of consumer group names.
- consumer
Id StringRegex - output
File String
Supporting Types
GetConsumerGroupsGroup
- Consumer
Id string - The name of the consumer group.
- Id string
- The ID of the consumer group, It is formatted to
<instance_id>:<consumer_id>
. - Instance
Id string - ID of the ALIKAFKA Instance that owns the consumer groups.
- Remark string
- The remark of the consumer group.
- Dictionary<string, string>
- A mapping of tags to assign to the consumer group.
- Consumer
Id string - The name of the consumer group.
- Id string
- The ID of the consumer group, It is formatted to
<instance_id>:<consumer_id>
. - Instance
Id string - ID of the ALIKAFKA Instance that owns the consumer groups.
- Remark string
- The remark of the consumer group.
- map[string]string
- A mapping of tags to assign to the consumer group.
- consumer
Id String - The name of the consumer group.
- id String
- The ID of the consumer group, It is formatted to
<instance_id>:<consumer_id>
. - instance
Id String - ID of the ALIKAFKA Instance that owns the consumer groups.
- remark String
- The remark of the consumer group.
- Map<String,String>
- A mapping of tags to assign to the consumer group.
- consumer
Id string - The name of the consumer group.
- id string
- The ID of the consumer group, It is formatted to
<instance_id>:<consumer_id>
. - instance
Id string - ID of the ALIKAFKA Instance that owns the consumer groups.
- remark string
- The remark of the consumer group.
- {[key: string]: string}
- A mapping of tags to assign to the consumer group.
- consumer_
id str - The name of the consumer group.
- id str
- The ID of the consumer group, It is formatted to
<instance_id>:<consumer_id>
. - instance_
id str - ID of the ALIKAFKA Instance that owns the consumer groups.
- remark str
- The remark of the consumer group.
- Mapping[str, str]
- A mapping of tags to assign to the consumer group.
- consumer
Id String - The name of the consumer group.
- id String
- The ID of the consumer group, It is formatted to
<instance_id>:<consumer_id>
. - instance
Id String - ID of the ALIKAFKA Instance that owns the consumer groups.
- remark String
- The remark of the consumer group.
- Map<String>
- A mapping of tags to assign to the consumer group.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.