Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi
alicloud.rocketmq.getGroups
Explore with Pulumi AI
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
}
Using getGroups
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 getGroups(args: GetGroupsArgs, opts?: InvokeOptions): Promise<GetGroupsResult>
function getGroupsOutput(args: GetGroupsOutputArgs, opts?: InvokeOptions): Output<GetGroupsResult>def get_groups(group_id_regex: Optional[str] = None,
               group_type: Optional[str] = None,
               ids: Optional[Sequence[str]] = None,
               instance_id: Optional[str] = None,
               name_regex: Optional[str] = None,
               output_file: Optional[str] = None,
               tags: Optional[Mapping[str, Any]] = None,
               opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(group_id_regex: Optional[pulumi.Input[str]] = None,
               group_type: Optional[pulumi.Input[str]] = None,
               ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               instance_id: Optional[pulumi.Input[str]] = None,
               name_regex: Optional[pulumi.Input[str]] = None,
               output_file: Optional[pulumi.Input[str]] = None,
               tags: Optional[pulumi.Input[Mapping[str, Any]]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetGroupsResult]func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)
func GetGroupsOutput(ctx *Context, args *GetGroupsOutputArgs, opts ...InvokeOption) GetGroupsResultOutput> Note: This function is named GetGroups in the Go SDK.
public static class GetGroups 
{
    public static Task<GetGroupsResult> InvokeAsync(GetGroupsArgs args, InvokeOptions? opts = null)
    public static Output<GetGroupsResult> Invoke(GetGroupsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:rocketmq/getGroups:getGroups
  arguments:
    # arguments dictionaryThe following arguments are supported:
- InstanceId string
- ID of the ONS Instance that owns the groups.
- GroupId stringRegex 
- A regex string to filter results by the group name.
- GroupType string
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- Ids List<string>
- A list of group names.
- NameRegex string
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Dictionary<string, object>
- A map of tags assigned to the Ons instance.
- InstanceId string
- ID of the ONS Instance that owns the groups.
- GroupId stringRegex 
- A regex string to filter results by the group name.
- GroupType string
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- Ids []string
- A list of group names.
- NameRegex string
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- map[string]interface{}
- A map of tags assigned to the Ons instance.
- instanceId String
- ID of the ONS Instance that owns the groups.
- groupId StringRegex 
- A regex string to filter results by the group name.
- groupType String
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- ids List<String>
- A list of group names.
- nameRegex String
- outputFile String
- File name where to save data source results (after running pulumi preview).
- Map<String,Object>
- A map of tags assigned to the Ons instance.
- instanceId string
- ID of the ONS Instance that owns the groups.
- groupId stringRegex 
- A regex string to filter results by the group name.
- groupType string
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- ids string[]
- A list of group names.
- nameRegex string
- outputFile string
- File name where to save data source results (after running pulumi preview).
- {[key: string]: any}
- A map of tags assigned to the Ons instance.
- instance_id str
- ID of the ONS Instance that owns the groups.
- group_id_ strregex 
- A regex string to filter results by the group name.
- group_type str
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- ids Sequence[str]
- A list of group names.
- name_regex str
- output_file str
- File name where to save data source results (after running pulumi preview).
- Mapping[str, Any]
- A map of tags assigned to the Ons instance.
- instanceId String
- ID of the ONS Instance that owns the groups.
- groupId StringRegex 
- A regex string to filter results by the group name.
- groupType String
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- ids List<String>
- A list of group names.
- nameRegex String
- outputFile String
- File name where to save data source results (after running pulumi preview).
- Map<Any>
- A map of tags assigned to the Ons instance.
getGroups Result
The following output properties are available:
- Groups
List<Pulumi.Ali Cloud. Rocket MQ. Outputs. Get Groups Group> 
- A list of groups. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of group names.
- InstanceId string
- Names List<string>
- GroupId stringRegex 
- GroupType string
- Specify the protocol applicable to the created Group ID.
- NameRegex string
- OutputFile string
- Dictionary<string, object>
- A map of tags assigned to the Ons group.
- Groups
[]GetGroups Group 
- A list of groups. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of group names.
- InstanceId string
- Names []string
- GroupId stringRegex 
- GroupType string
- Specify the protocol applicable to the created Group ID.
- NameRegex string
- OutputFile string
- map[string]interface{}
- A map of tags assigned to the Ons group.
- groups
List<GetGroups Group> 
- A list of groups. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of group names.
- instanceId String
- names List<String>
- groupId StringRegex 
- groupType String
- Specify the protocol applicable to the created Group ID.
- nameRegex String
- outputFile String
- Map<String,Object>
- A map of tags assigned to the Ons group.
- groups
GetGroups Group[] 
- A list of groups. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of group names.
- instanceId string
- names string[]
- groupId stringRegex 
- groupType string
- Specify the protocol applicable to the created Group ID.
- nameRegex string
- outputFile string
- {[key: string]: any}
- A map of tags assigned to the Ons group.
- groups
Sequence[GetGroups Group] 
- A list of groups. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of group names.
- instance_id str
- names Sequence[str]
- group_id_ strregex 
- group_type str
- Specify the protocol applicable to the created Group ID.
- name_regex str
- output_file str
- Mapping[str, Any]
- A map of tags assigned to the Ons group.
- groups List<Property Map>
- A list of groups. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of group names.
- instanceId String
- names List<String>
- groupId StringRegex 
- groupType String
- Specify the protocol applicable to the created Group ID.
- nameRegex String
- outputFile String
- Map<Any>
- A map of tags assigned to the Ons group.
Supporting Types
GetGroupsGroup  
- GroupName string
- The name of the group.
- GroupType string
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- Id string
- The name of the group.
- IndependentNaming bool
- Indicates whether namespaces are available. Read Fields in SubscribeInfoDo for further details.
- InstanceId string
- ID of the ONS Instance that owns the groups.
- Owner string
- The ID of the group owner, which is the Alibaba Cloud UID.
- Remark string
- Remark of the group.
- Dictionary<string, object>
- A map of tags assigned to the Ons instance.
- GroupName string
- The name of the group.
- GroupType string
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- Id string
- The name of the group.
- IndependentNaming bool
- Indicates whether namespaces are available. Read Fields in SubscribeInfoDo for further details.
- InstanceId string
- ID of the ONS Instance that owns the groups.
- Owner string
- The ID of the group owner, which is the Alibaba Cloud UID.
- Remark string
- Remark of the group.
- map[string]interface{}
- A map of tags assigned to the Ons instance.
- groupName String
- The name of the group.
- groupType String
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- id String
- The name of the group.
- independentNaming Boolean
- Indicates whether namespaces are available. Read Fields in SubscribeInfoDo for further details.
- instanceId String
- ID of the ONS Instance that owns the groups.
- owner String
- The ID of the group owner, which is the Alibaba Cloud UID.
- remark String
- Remark of the group.
- Map<String,Object>
- A map of tags assigned to the Ons instance.
- groupName string
- The name of the group.
- groupType string
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- id string
- The name of the group.
- independentNaming boolean
- Indicates whether namespaces are available. Read Fields in SubscribeInfoDo for further details.
- instanceId string
- ID of the ONS Instance that owns the groups.
- owner string
- The ID of the group owner, which is the Alibaba Cloud UID.
- remark string
- Remark of the group.
- {[key: string]: any}
- A map of tags assigned to the Ons instance.
- group_name str
- The name of the group.
- group_type str
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- id str
- The name of the group.
- independent_naming bool
- Indicates whether namespaces are available. Read Fields in SubscribeInfoDo for further details.
- instance_id str
- ID of the ONS Instance that owns the groups.
- owner str
- The ID of the group owner, which is the Alibaba Cloud UID.
- remark str
- Remark of the group.
- Mapping[str, Any]
- A map of tags assigned to the Ons instance.
- groupName String
- The name of the group.
- groupType String
- Specify the protocol applicable to the created Group ID. Valid values: tcp,http. Default totcp.
- id String
- The name of the group.
- independentNaming Boolean
- Indicates whether namespaces are available. Read Fields in SubscribeInfoDo for further details.
- instanceId String
- ID of the ONS Instance that owns the groups.
- owner String
- The ID of the group owner, which is the Alibaba Cloud UID.
- remark String
- Remark of the group.
- Map<Any>
- A map of tags assigned to the Ons instance.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.