Alibaba Cloud v3.87.0 published on Saturday, Oct 18, 2025 by Pulumi
alicloud.mse.getGateways
This data source provides the Mse Gateways of the current Alibaba Cloud user.
NOTE: Available in v1.157.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.mse.getGateways({
    ids: ["example_id"],
});
export const mseGatewayId1 = ids.then(ids => ids.gateways?.[0]?.id);
const nameRegex = alicloud.mse.getGateways({
    nameRegex: "^my-Gateway",
});
export const mseGatewayId2 = nameRegex.then(nameRegex => nameRegex.gateways?.[0]?.id);
const status = alicloud.mse.getGateways({
    status: "2",
});
export const mseGatewayId3 = status.then(status => status.gateways?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.mse.get_gateways(ids=["example_id"])
pulumi.export("mseGatewayId1", ids.gateways[0].id)
name_regex = alicloud.mse.get_gateways(name_regex="^my-Gateway")
pulumi.export("mseGatewayId2", name_regex.gateways[0].id)
status = alicloud.mse.get_gateways(status="2")
pulumi.export("mseGatewayId3", status.gateways[0].id)
package main
import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/mse"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := mse.GetGateways(ctx, &mse.GetGatewaysArgs{
			Ids: []string{
				"example_id",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("mseGatewayId1", ids.Gateways[0].Id)
		nameRegex, err := mse.GetGateways(ctx, &mse.GetGatewaysArgs{
			NameRegex: pulumi.StringRef("^my-Gateway"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("mseGatewayId2", nameRegex.Gateways[0].Id)
		status, err := mse.GetGateways(ctx, &mse.GetGatewaysArgs{
			Status: pulumi.StringRef("2"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("mseGatewayId3", status.Gateways[0].Id)
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Mse.GetGateways.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
    });
    var nameRegex = AliCloud.Mse.GetGateways.Invoke(new()
    {
        NameRegex = "^my-Gateway",
    });
    var status = AliCloud.Mse.GetGateways.Invoke(new()
    {
        Status = "2",
    });
    return new Dictionary<string, object?>
    {
        ["mseGatewayId1"] = ids.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Id),
        ["mseGatewayId2"] = nameRegex.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Id),
        ["mseGatewayId3"] = status.Apply(getGatewaysResult => getGatewaysResult.Gateways[0]?.Id),
    };
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.mse.MseFunctions;
import com.pulumi.alicloud.mse.inputs.GetGatewaysArgs;
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 ids = MseFunctions.getGateways(GetGatewaysArgs.builder()
            .ids("example_id")
            .build());
        ctx.export("mseGatewayId1", ids.gateways()[0].id());
        final var nameRegex = MseFunctions.getGateways(GetGatewaysArgs.builder()
            .nameRegex("^my-Gateway")
            .build());
        ctx.export("mseGatewayId2", nameRegex.gateways()[0].id());
        final var status = MseFunctions.getGateways(GetGatewaysArgs.builder()
            .status("2")
            .build());
        ctx.export("mseGatewayId3", status.gateways()[0].id());
    }
}
variables:
  ids:
    fn::invoke:
      function: alicloud:mse:getGateways
      arguments:
        ids:
          - example_id
  nameRegex:
    fn::invoke:
      function: alicloud:mse:getGateways
      arguments:
        nameRegex: ^my-Gateway
  status:
    fn::invoke:
      function: alicloud:mse:getGateways
      arguments:
        status: '2'
outputs:
  mseGatewayId1: ${ids.gateways[0].id}
  mseGatewayId2: ${nameRegex.gateways[0].id}
  mseGatewayId3: ${status.gateways[0].id}
Using getGateways
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 getGateways(args: GetGatewaysArgs, opts?: InvokeOptions): Promise<GetGatewaysResult>
function getGatewaysOutput(args: GetGatewaysOutputArgs, opts?: InvokeOptions): Output<GetGatewaysResult>def get_gateways(enable_details: Optional[bool] = None,
                 gateway_name: Optional[str] = None,
                 ids: Optional[Sequence[str]] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[str] = None,
                 status: Optional[str] = None,
                 vpc_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetGatewaysResult
def get_gateways_output(enable_details: Optional[pulumi.Input[bool]] = None,
                 gateway_name: Optional[pulumi.Input[str]] = None,
                 ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name_regex: Optional[pulumi.Input[str]] = None,
                 output_file: Optional[pulumi.Input[str]] = None,
                 status: Optional[pulumi.Input[str]] = None,
                 vpc_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetGatewaysResult]func GetGateways(ctx *Context, args *GetGatewaysArgs, opts ...InvokeOption) (*GetGatewaysResult, error)
func GetGatewaysOutput(ctx *Context, args *GetGatewaysOutputArgs, opts ...InvokeOption) GetGatewaysResultOutput> Note: This function is named GetGateways in the Go SDK.
public static class GetGateways 
{
    public static Task<GetGatewaysResult> InvokeAsync(GetGatewaysArgs args, InvokeOptions? opts = null)
    public static Output<GetGatewaysResult> Invoke(GetGatewaysInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetGatewaysResult> getGateways(GetGatewaysArgs args, InvokeOptions options)
public static Output<GetGatewaysResult> getGateways(GetGatewaysArgs args, InvokeOptions options)
fn::invoke:
  function: alicloud:mse/getGateways:getGateways
  arguments:
    # arguments dictionaryThe following arguments are supported:
- EnableDetails bool
- Default to false. Set it totruecan output more details about resource attributes.
- GatewayName string
- The name of the Gateway.
- Ids List<string>
- A list of Gateway IDs.
- NameRegex string
- A regex string to filter results by Gateway name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the gateway. Valid values: 0,1,2,3,4,6,8,9,10,11,12,13.
- VpcId string
- The ID of the VPC.
- EnableDetails bool
- Default to false. Set it totruecan output more details about resource attributes.
- GatewayName string
- The name of the Gateway.
- Ids []string
- A list of Gateway IDs.
- NameRegex string
- A regex string to filter results by Gateway name.
- OutputFile string
- File name where to save data source results (after running pulumi preview).
- Status string
- The status of the gateway. Valid values: 0,1,2,3,4,6,8,9,10,11,12,13.
- VpcId string
- The ID of the VPC.
- enableDetails Boolean
- Default to false. Set it totruecan output more details about resource attributes.
- gatewayName String
- The name of the Gateway.
- ids List<String>
- A list of Gateway IDs.
- nameRegex String
- A regex string to filter results by Gateway name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the gateway. Valid values: 0,1,2,3,4,6,8,9,10,11,12,13.
- vpcId String
- The ID of the VPC.
- enableDetails boolean
- Default to false. Set it totruecan output more details about resource attributes.
- gatewayName string
- The name of the Gateway.
- ids string[]
- A list of Gateway IDs.
- nameRegex string
- A regex string to filter results by Gateway name.
- outputFile string
- File name where to save data source results (after running pulumi preview).
- status string
- The status of the gateway. Valid values: 0,1,2,3,4,6,8,9,10,11,12,13.
- vpcId string
- The ID of the VPC.
- enable_details bool
- Default to false. Set it totruecan output more details about resource attributes.
- gateway_name str
- The name of the Gateway.
- ids Sequence[str]
- A list of Gateway IDs.
- name_regex str
- A regex string to filter results by Gateway name.
- output_file str
- File name where to save data source results (after running pulumi preview).
- status str
- The status of the gateway. Valid values: 0,1,2,3,4,6,8,9,10,11,12,13.
- vpc_id str
- The ID of the VPC.
- enableDetails Boolean
- Default to false. Set it totruecan output more details about resource attributes.
- gatewayName String
- The name of the Gateway.
- ids List<String>
- A list of Gateway IDs.
- nameRegex String
- A regex string to filter results by Gateway name.
- outputFile String
- File name where to save data source results (after running pulumi preview).
- status String
- The status of the gateway. Valid values: 0,1,2,3,4,6,8,9,10,11,12,13.
- vpcId String
- The ID of the VPC.
getGateways Result
The following output properties are available:
- Gateways
List<Pulumi.Ali Cloud. Mse. Outputs. Get Gateways Gateway> 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- EnableDetails bool
- GatewayName string
- NameRegex string
- OutputFile string
- Status string
- VpcId string
- Gateways
[]GetGateways Gateway 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- EnableDetails bool
- GatewayName string
- NameRegex string
- OutputFile string
- Status string
- VpcId string
- gateways
List<GetGateways Gateway> 
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enableDetails Boolean
- gatewayName String
- nameRegex String
- outputFile String
- status String
- vpcId String
- gateways
GetGateways Gateway[] 
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enableDetails boolean
- gatewayName string
- nameRegex string
- outputFile string
- status string
- vpcId string
- gateways
Sequence[GetGateways Gateway] 
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- enable_details bool
- gateway_name str
- name_regex str
- output_file str
- status str
- vpc_id str
- gateways List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enableDetails Boolean
- gatewayName String
- nameRegex String
- outputFile String
- status String
- vpcId String
Supporting Types
GetGatewaysGateway  
- BackupVswitch stringId 
- The backup vswitch id.
- GatewayName string
- The name of the Gateway.
- GatewayUnique stringId 
- Gateway unique identification.
- Id string
- The ID of the Gateway.
- PaymentType string
- The payment type of the resource.
- Replica string
- Number of Gateway Nodes.
- SlbLists List<Pulumi.Ali Cloud. Mse. Inputs. Get Gateways Gateway Slb List> 
- A list of gateway Slb.
- Spec string
- Gateway Node Specifications.
- Status string
- The status of the gateway.
- VpcId string
- The ID of the vpc.
- VswitchId string
- The ID of the vswitch.
- BackupVswitch stringId 
- The backup vswitch id.
- GatewayName string
- The name of the Gateway.
- GatewayUnique stringId 
- Gateway unique identification.
- Id string
- The ID of the Gateway.
- PaymentType string
- The payment type of the resource.
- Replica string
- Number of Gateway Nodes.
- SlbLists []GetGateways Gateway Slb List 
- A list of gateway Slb.
- Spec string
- Gateway Node Specifications.
- Status string
- The status of the gateway.
- VpcId string
- The ID of the vpc.
- VswitchId string
- The ID of the vswitch.
- backupVswitch StringId 
- The backup vswitch id.
- gatewayName String
- The name of the Gateway.
- gatewayUnique StringId 
- Gateway unique identification.
- id String
- The ID of the Gateway.
- paymentType String
- The payment type of the resource.
- replica String
- Number of Gateway Nodes.
- slbLists List<GetGateways Gateway Slb List> 
- A list of gateway Slb.
- spec String
- Gateway Node Specifications.
- status String
- The status of the gateway.
- vpcId String
- The ID of the vpc.
- vswitchId String
- The ID of the vswitch.
- backupVswitch stringId 
- The backup vswitch id.
- gatewayName string
- The name of the Gateway.
- gatewayUnique stringId 
- Gateway unique identification.
- id string
- The ID of the Gateway.
- paymentType string
- The payment type of the resource.
- replica string
- Number of Gateway Nodes.
- slbLists GetGateways Gateway Slb List[] 
- A list of gateway Slb.
- spec string
- Gateway Node Specifications.
- status string
- The status of the gateway.
- vpcId string
- The ID of the vpc.
- vswitchId string
- The ID of the vswitch.
- backup_vswitch_ strid 
- The backup vswitch id.
- gateway_name str
- The name of the Gateway.
- gateway_unique_ strid 
- Gateway unique identification.
- id str
- The ID of the Gateway.
- payment_type str
- The payment type of the resource.
- replica str
- Number of Gateway Nodes.
- slb_lists Sequence[GetGateways Gateway Slb List] 
- A list of gateway Slb.
- spec str
- Gateway Node Specifications.
- status str
- The status of the gateway.
- vpc_id str
- The ID of the vpc.
- vswitch_id str
- The ID of the vswitch.
- backupVswitch StringId 
- The backup vswitch id.
- gatewayName String
- The name of the Gateway.
- gatewayUnique StringId 
- Gateway unique identification.
- id String
- The ID of the Gateway.
- paymentType String
- The payment type of the resource.
- replica String
- Number of Gateway Nodes.
- slbLists List<Property Map>
- A list of gateway Slb.
- spec String
- Gateway Node Specifications.
- status String
- The status of the gateway.
- vpcId String
- The ID of the vpc.
- vswitchId String
- The ID of the vswitch.
GetGatewaysGatewaySlbList    
- AssociateId string
- The associate id.
- GatewaySlb stringMode 
- The Mode of the gateway slb.
- GatewaySlb stringStatus 
- The Status of the gateway slb.
- GmtCreate string
- The creation time of the gateway slb.
- SlbId string
- The ID of the gateway slb.
- SlbIp string
- The ip of the gateway slb.
- SlbPort string
- The port of the gateway slb.
- Type string
- The type of the gateway slb.
- AssociateId string
- The associate id.
- GatewaySlb stringMode 
- The Mode of the gateway slb.
- GatewaySlb stringStatus 
- The Status of the gateway slb.
- GmtCreate string
- The creation time of the gateway slb.
- SlbId string
- The ID of the gateway slb.
- SlbIp string
- The ip of the gateway slb.
- SlbPort string
- The port of the gateway slb.
- Type string
- The type of the gateway slb.
- associateId String
- The associate id.
- gatewaySlb StringMode 
- The Mode of the gateway slb.
- gatewaySlb StringStatus 
- The Status of the gateway slb.
- gmtCreate String
- The creation time of the gateway slb.
- slbId String
- The ID of the gateway slb.
- slbIp String
- The ip of the gateway slb.
- slbPort String
- The port of the gateway slb.
- type String
- The type of the gateway slb.
- associateId string
- The associate id.
- gatewaySlb stringMode 
- The Mode of the gateway slb.
- gatewaySlb stringStatus 
- The Status of the gateway slb.
- gmtCreate string
- The creation time of the gateway slb.
- slbId string
- The ID of the gateway slb.
- slbIp string
- The ip of the gateway slb.
- slbPort string
- The port of the gateway slb.
- type string
- The type of the gateway slb.
- associate_id str
- The associate id.
- gateway_slb_ strmode 
- The Mode of the gateway slb.
- gateway_slb_ strstatus 
- The Status of the gateway slb.
- gmt_create str
- The creation time of the gateway slb.
- slb_id str
- The ID of the gateway slb.
- slb_ip str
- The ip of the gateway slb.
- slb_port str
- The port of the gateway slb.
- type str
- The type of the gateway slb.
- associateId String
- The associate id.
- gatewaySlb StringMode 
- The Mode of the gateway slb.
- gatewaySlb StringStatus 
- The Status of the gateway slb.
- gmtCreate String
- The creation time of the gateway slb.
- slbId String
- The ID of the gateway slb.
- slbIp String
- The ip of the gateway slb.
- slbPort String
- The port of the gateway slb.
- type String
- The type of the gateway slb.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the alicloudTerraform Provider.
