get Groups
This data source provides a list of ONS Groups in an Alibaba Cloud account according to the specified filters.
NOTE: Available in 1.53.0+
Example Usage
variable "name" {
default = "onsInstanceName"
}
variable "group_name" {
default = "GID-onsGroupDatasourceName"
}
resource "alicloud_ons_instance" "default" {
instance_name = var.name
remark = "default_ons_instance_remark"
}
resource "alicloud_ons_group" "default" {
group_name = var.group_name
instance_id = alicloud_ons_instance.default.id
remark = "dafault_ons_group_remark"
}
data "alicloud_ons_groups" "groups_ds" {
instance_id = alicloud_ons_group.default.instance_id
name_regex = var.group_id
output_file = "groups.txt"
}
output "first_group_name" {
value = data.alicloud_ons_groups.groups_ds.groups.0.group_name
}
Content copied to clipboard
Return
A collection of values returned by getGroups.
Parameters
argument
A collection of arguments for invoking getGroups.
suspend fun getGroups(groupIdRegex: String? = null, groupType: String? = null, ids: List<String>? = null, instanceId: String, nameRegex: String? = null, outputFile: String? = null, tags: Map<String, String>? = null): GetGroupsResult
Return
A collection of values returned by getGroups.
Parameters
group Id Regex
A regex string to filter results by the group name.
group Type
Specify the protocol applicable to the created Group ID. Valid values: tcp
, http
. Default to tcp
.
ids
A list of group names.
instance Id
ID of the ONS Instance that owns the groups.
name Regex
output File
File name where to save data source results (after running pulumi preview
).
tags
A map of tags assigned to the Ons instance.
See also
Return
A collection of values returned by getGroups.
Parameters
argument
Builder for com.pulumi.alicloud.rocketmq.kotlin.inputs.GetGroupsPlainArgs.