1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. apigateway
  5. getGroups
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.apigateway.getGroups

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides the api groups of the current Alibaba Cloud user.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const dataApigatway = alicloud.apigateway.getGroups({
    outputFile: "outgroups",
});
export const firstGroupId = dataApigatway.then(dataApigatway => dataApigatway.groups?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

data_apigatway = alicloud.apigateway.get_groups(output_file="outgroups")
pulumi.export("firstGroupId", data_apigatway.groups[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/apigateway"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		dataApigatway, err := apigateway.GetGroups(ctx, &apigateway.GetGroupsArgs{
			OutputFile: pulumi.StringRef("outgroups"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("firstGroupId", dataApigatway.Groups[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var dataApigatway = AliCloud.ApiGateway.GetGroups.Invoke(new()
    {
        OutputFile = "outgroups",
    });

    return new Dictionary<string, object?>
    {
        ["firstGroupId"] = dataApigatway.Apply(getGroupsResult => getGroupsResult.Groups[0]?.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.apigateway.ApigatewayFunctions;
import com.pulumi.alicloud.apigateway.inputs.GetGroupsArgs;
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 dataApigatway = ApigatewayFunctions.getGroups(GetGroupsArgs.builder()
            .outputFile("outgroups")
            .build());

        ctx.export("firstGroupId", dataApigatway.applyValue(getGroupsResult -> getGroupsResult.groups()[0].id()));
    }
}
Copy
variables:
  dataApigatway:
    fn::invoke:
      function: alicloud:apigateway:getGroups
      arguments:
        outputFile: outgroups
outputs:
  firstGroupId: ${dataApigatway.groups[0].id}
Copy

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>
Copy
def get_groups(ids: Optional[Sequence[str]] = None,
               name_regex: Optional[str] = None,
               output_file: Optional[str] = None,
               opts: Optional[InvokeOptions] = None) -> GetGroupsResult
def get_groups_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
               name_regex: Optional[pulumi.Input[str]] = None,
               output_file: Optional[pulumi.Input[str]] = None,
               opts: Optional[InvokeOptions] = None) -> Output[GetGroupsResult]
Copy
func GetGroups(ctx *Context, args *GetGroupsArgs, opts ...InvokeOption) (*GetGroupsResult, error)
func GetGroupsOutput(ctx *Context, args *GetGroupsOutputArgs, opts ...InvokeOption) GetGroupsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
public static Output<GetGroupsResult> getGroups(GetGroupsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:apigateway/getGroups:getGroups
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids List<string>
A list of api group IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter api gateway groups by name.
OutputFile string
File name where to save data source results (after running pulumi preview).
Ids []string
A list of api group IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter api gateway groups by name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ids List<String>
A list of api group IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter api gateway groups by name.
outputFile String
File name where to save data source results (after running pulumi preview).
ids string[]
A list of api group IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter api gateway groups by name.
outputFile string
File name where to save data source results (after running pulumi preview).
ids Sequence[str]
A list of api group IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter api gateway groups by name.
output_file str
File name where to save data source results (after running pulumi preview).
ids List<String>
A list of api group IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter api gateway groups by name.
outputFile String
File name where to save data source results (after running pulumi preview).

getGroups Result

The following output properties are available:

Groups List<Pulumi.AliCloud.ApiGateway.Outputs.GetGroupsGroup>
A list of api groups. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of api group IDs.
Names List<string>
A list of api group names.
NameRegex string
OutputFile string
Groups []GetGroupsGroup
A list of api groups. Each element contains the following attributes:
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of api group IDs.
Names []string
A list of api group names.
NameRegex string
OutputFile string
groups List<GetGroupsGroup>
A list of api groups. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of api group IDs.
names List<String>
A list of api group names.
nameRegex String
outputFile String
groups GetGroupsGroup[]
A list of api groups. Each element contains the following attributes:
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of api group IDs.
names string[]
A list of api group names.
nameRegex string
outputFile string
groups Sequence[GetGroupsGroup]
A list of api groups. Each element contains the following attributes:
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of api group IDs.
names Sequence[str]
A list of api group names.
name_regex str
output_file str
groups List<Property Map>
A list of api groups. Each element contains the following attributes:
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of api group IDs.
names List<String>
A list of api group names.
nameRegex String
outputFile String

Supporting Types

GetGroupsGroup

BillingStatus This property is required. string
Billing status.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to outstanding payment.
CreatedTime This property is required. string
Creation time (Greenwich mean time).
Description This property is required. string
API group description.
Id This property is required. string
API group ID, which is generated by the system and globally unique.
IllegalStatus This property is required. string
Locking in invalid state.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to illegality.
ModifiedTime This property is required. string
Last modification time (Greenwich mean time).
Name This property is required. string
API group name.
RegionId This property is required. string
The ID of the region where the API group is located.
SubDomain This property is required. string
Second-level domain name automatically assigned to the API group.
TrafficLimit This property is required. int
Upper QPS limit of the API group; default value: 500, which can be increased by submitting an application.
BillingStatus This property is required. string
Billing status.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to outstanding payment.
CreatedTime This property is required. string
Creation time (Greenwich mean time).
Description This property is required. string
API group description.
Id This property is required. string
API group ID, which is generated by the system and globally unique.
IllegalStatus This property is required. string
Locking in invalid state.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to illegality.
ModifiedTime This property is required. string
Last modification time (Greenwich mean time).
Name This property is required. string
API group name.
RegionId This property is required. string
The ID of the region where the API group is located.
SubDomain This property is required. string
Second-level domain name automatically assigned to the API group.
TrafficLimit This property is required. int
Upper QPS limit of the API group; default value: 500, which can be increased by submitting an application.
billingStatus This property is required. String
Billing status.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to outstanding payment.
createdTime This property is required. String
Creation time (Greenwich mean time).
description This property is required. String
API group description.
id This property is required. String
API group ID, which is generated by the system and globally unique.
illegalStatus This property is required. String
Locking in invalid state.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to illegality.
modifiedTime This property is required. String
Last modification time (Greenwich mean time).
name This property is required. String
API group name.
regionId This property is required. String
The ID of the region where the API group is located.
subDomain This property is required. String
Second-level domain name automatically assigned to the API group.
trafficLimit This property is required. Integer
Upper QPS limit of the API group; default value: 500, which can be increased by submitting an application.
billingStatus This property is required. string
Billing status.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to outstanding payment.
createdTime This property is required. string
Creation time (Greenwich mean time).
description This property is required. string
API group description.
id This property is required. string
API group ID, which is generated by the system and globally unique.
illegalStatus This property is required. string
Locking in invalid state.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to illegality.
modifiedTime This property is required. string
Last modification time (Greenwich mean time).
name This property is required. string
API group name.
regionId This property is required. string
The ID of the region where the API group is located.
subDomain This property is required. string
Second-level domain name automatically assigned to the API group.
trafficLimit This property is required. number
Upper QPS limit of the API group; default value: 500, which can be increased by submitting an application.
billing_status This property is required. str
Billing status.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to outstanding payment.
created_time This property is required. str
Creation time (Greenwich mean time).
description This property is required. str
API group description.
id This property is required. str
API group ID, which is generated by the system and globally unique.
illegal_status This property is required. str
Locking in invalid state.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to illegality.
modified_time This property is required. str
Last modification time (Greenwich mean time).
name This property is required. str
API group name.
region_id This property is required. str
The ID of the region where the API group is located.
sub_domain This property is required. str
Second-level domain name automatically assigned to the API group.
traffic_limit This property is required. int
Upper QPS limit of the API group; default value: 500, which can be increased by submitting an application.
billingStatus This property is required. String
Billing status.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to outstanding payment.
createdTime This property is required. String
Creation time (Greenwich mean time).
description This property is required. String
API group description.
id This property is required. String
API group ID, which is generated by the system and globally unique.
illegalStatus This property is required. String
Locking in invalid state.

  • NORMAL: The API group is normal.
  • LOCKED: Locked due to illegality.
modifiedTime This property is required. String
Last modification time (Greenwich mean time).
name This property is required. String
API group name.
regionId This property is required. String
The ID of the region where the API group is located.
subDomain This property is required. String
Second-level domain name automatically assigned to the API group.
trafficLimit This property is required. Number
Upper QPS limit of the API group; default value: 500, which can be increased by submitting an application.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi