1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. apigateway
  5. getGroups
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.apigateway.getGroups

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 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);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    data_apigatway = alicloud.apigateway.get_groups(output_file="outgroups")
    pulumi.export("firstGroupId", data_apigatway.groups[0].id)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      dataApigatway:
        fn::invoke:
          Function: alicloud:apigateway:getGroups
          Arguments:
            outputFile: outgroups
    outputs:
      firstGroupId: ${dataApigatway.groups[0].id}
    

    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(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]
    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:apigateway/getGroups:getGroups
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of api group IDs.
    NameRegex 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 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 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 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 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 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 string
    Billing status.

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

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

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

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

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

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

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

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

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

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

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

    • NORMAL: The API group is normal.
    • LOCKED: Locked due to illegality.
    modifiedTime String
    Last modification time (Greenwich mean time).
    name String
    API group name.
    regionId String
    The ID of the region where the API group is located.
    subDomain String
    Second-level domain name automatically assigned to the API group.
    trafficLimit 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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi