1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getApigwEnvironmentsV2
opentelekomcloud 1.36.49 published on Thursday, Oct 2, 2025 by opentelekomcloud

opentelekomcloud.getApigwEnvironmentsV2

Deploy with Pulumi
opentelekomcloud logo
opentelekomcloud 1.36.49 published on Thursday, Oct 2, 2025 by opentelekomcloud

    Use this data source to query the environment list under the APIGW instance within OpenTelekomCloud.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const config = new pulumi.Config();
    const instanceId = config.requireObject("instanceId");
    const environmentName = config.requireObject("environmentName");
    const test = opentelekomcloud.getApigwEnvironmentsV2({
        instanceId: instanceId,
        name: environmentName,
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    config = pulumi.Config()
    instance_id = config.require_object("instanceId")
    environment_name = config.require_object("environmentName")
    test = opentelekomcloud.get_apigw_environments_v2(instance_id=instance_id,
        name=environment_name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		instanceId := cfg.RequireObject("instanceId")
    		environmentName := cfg.RequireObject("environmentName")
    		_, err := opentelekomcloud.GetApigwEnvironmentsV2(ctx, &opentelekomcloud.GetApigwEnvironmentsV2Args{
    			InstanceId: instanceId,
    			Name:       pulumi.StringRef(environmentName),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var instanceId = config.RequireObject<dynamic>("instanceId");
        var environmentName = config.RequireObject<dynamic>("environmentName");
        var test = Opentelekomcloud.GetApigwEnvironmentsV2.Invoke(new()
        {
            InstanceId = instanceId,
            Name = environmentName,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetApigwEnvironmentsV2Args;
    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 config = ctx.config();
            final var instanceId = config.get("instanceId");
            final var environmentName = config.get("environmentName");
            final var test = OpentelekomcloudFunctions.getApigwEnvironmentsV2(GetApigwEnvironmentsV2Args.builder()
                .instanceId(instanceId)
                .name(environmentName)
                .build());
    
        }
    }
    
    configuration:
      instanceId:
        type: dynamic
      environmentName:
        type: dynamic
    variables:
      test:
        fn::invoke:
          function: opentelekomcloud:getApigwEnvironmentsV2
          arguments:
            instanceId: ${instanceId}
            name: ${environmentName}
    

    Using getApigwEnvironmentsV2

    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 getApigwEnvironmentsV2(args: GetApigwEnvironmentsV2Args, opts?: InvokeOptions): Promise<GetApigwEnvironmentsV2Result>
    function getApigwEnvironmentsV2Output(args: GetApigwEnvironmentsV2OutputArgs, opts?: InvokeOptions): Output<GetApigwEnvironmentsV2Result>
    def get_apigw_environments_v2(id: Optional[str] = None,
                                  instance_id: Optional[str] = None,
                                  name: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetApigwEnvironmentsV2Result
    def get_apigw_environments_v2_output(id: Optional[pulumi.Input[str]] = None,
                                  instance_id: Optional[pulumi.Input[str]] = None,
                                  name: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetApigwEnvironmentsV2Result]
    func GetApigwEnvironmentsV2(ctx *Context, args *GetApigwEnvironmentsV2Args, opts ...InvokeOption) (*GetApigwEnvironmentsV2Result, error)
    func GetApigwEnvironmentsV2Output(ctx *Context, args *GetApigwEnvironmentsV2OutputArgs, opts ...InvokeOption) GetApigwEnvironmentsV2ResultOutput

    > Note: This function is named GetApigwEnvironmentsV2 in the Go SDK.

    public static class GetApigwEnvironmentsV2 
    {
        public static Task<GetApigwEnvironmentsV2Result> InvokeAsync(GetApigwEnvironmentsV2Args args, InvokeOptions? opts = null)
        public static Output<GetApigwEnvironmentsV2Result> Invoke(GetApigwEnvironmentsV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApigwEnvironmentsV2Result> getApigwEnvironmentsV2(GetApigwEnvironmentsV2Args args, InvokeOptions options)
    public static Output<GetApigwEnvironmentsV2Result> getApigwEnvironmentsV2(GetApigwEnvironmentsV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getApigwEnvironmentsV2:getApigwEnvironmentsV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    InstanceId string
    Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
    Id string
    ID of the APIGW environment.
    Name string
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    InstanceId string
    Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
    Id string
    ID of the APIGW environment.
    Name string
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    instanceId String
    Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
    id String
    ID of the APIGW environment.
    name String
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    instanceId string
    Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
    id string
    ID of the APIGW environment.
    name string
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    instance_id str
    Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
    id str
    ID of the APIGW environment.
    name str
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    instanceId String
    Specifies an ID of the APIGW dedicated instance to which the API environment belongs.
    id String
    ID of the APIGW environment.
    name String
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.

    getApigwEnvironmentsV2 Result

    The following output properties are available:

    Environments List<GetApigwEnvironmentsV2Environment>
    List of APIGW environment details. The structure is documented below.
    Id string
    ID of the APIGW environment.
    InstanceId string
    Region string
    The region in which queried the data source.
    Name string
    The environment name.
    Environments []GetApigwEnvironmentsV2Environment
    List of APIGW environment details. The structure is documented below.
    Id string
    ID of the APIGW environment.
    InstanceId string
    Region string
    The region in which queried the data source.
    Name string
    The environment name.
    environments List<GetApigwEnvironmentsV2Environment>
    List of APIGW environment details. The structure is documented below.
    id String
    ID of the APIGW environment.
    instanceId String
    region String
    The region in which queried the data source.
    name String
    The environment name.
    environments GetApigwEnvironmentsV2Environment[]
    List of APIGW environment details. The structure is documented below.
    id string
    ID of the APIGW environment.
    instanceId string
    region string
    The region in which queried the data source.
    name string
    The environment name.
    environments Sequence[GetApigwEnvironmentsV2Environment]
    List of APIGW environment details. The structure is documented below.
    id str
    ID of the APIGW environment.
    instance_id str
    region str
    The region in which queried the data source.
    name str
    The environment name.
    environments List<Property Map>
    List of APIGW environment details. The structure is documented below.
    id String
    ID of the APIGW environment.
    instanceId String
    region String
    The region in which queried the data source.
    name String
    The environment name.

    Supporting Types

    GetApigwEnvironmentsV2Environment

    CreatedAt string
    Time when the APIGW environment was created, in RFC-3339 format.
    Description string
    The description about the API environment.
    Id string
    ID of the APIGW environment.
    Name string
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    CreatedAt string
    Time when the APIGW environment was created, in RFC-3339 format.
    Description string
    The description about the API environment.
    Id string
    ID of the APIGW environment.
    Name string
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    createdAt String
    Time when the APIGW environment was created, in RFC-3339 format.
    description String
    The description about the API environment.
    id String
    ID of the APIGW environment.
    name String
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    createdAt string
    Time when the APIGW environment was created, in RFC-3339 format.
    description string
    The description about the API environment.
    id string
    ID of the APIGW environment.
    name string
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    created_at str
    Time when the APIGW environment was created, in RFC-3339 format.
    description str
    The description about the API environment.
    id str
    ID of the APIGW environment.
    name str
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.
    createdAt String
    Time when the APIGW environment was created, in RFC-3339 format.
    description String
    The description about the API environment.
    id String
    ID of the APIGW environment.
    name String
    Specifies the name of the API environment. The API environment name consists of 3 to 64 characters, starting with a letter. Only letters, digits and underscores (_) are allowed.

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.49 published on Thursday, Oct 2, 2025 by opentelekomcloud
      Meet Neo: Your AI Platform Teammate