Alibaba Cloud v3.66.0 published on Friday, Nov 15, 2024 by Pulumi
alicloud.mse.getGateways
Explore with Pulumi AI
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.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].id()));
final var nameRegex = MseFunctions.getGateways(GetGatewaysArgs.builder()
.nameRegex("^my-Gateway")
.build());
ctx.export("mseGatewayId2", nameRegex.applyValue(getGatewaysResult -> getGatewaysResult.gateways()[0].id()));
final var status = MseFunctions.getGateways(GetGatewaysArgs.builder()
.status("2")
.build());
ctx.export("mseGatewayId3", status.applyValue(getGatewaysResult -> getGatewaysResult.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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:mse/getGateways:getGateways
arguments:
# arguments dictionary
The following arguments are supported:
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Gateway
Name string - The name of the Gateway.
- Ids List<string>
- A list of Gateway IDs.
- Name
Regex string - A regex string to filter results by Gateway name.
- Output
File 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
. - Vpc
Id string - The ID of the VPC.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Gateway
Name string - The name of the Gateway.
- Ids []string
- A list of Gateway IDs.
- Name
Regex string - A regex string to filter results by Gateway name.
- Output
File 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
. - Vpc
Id string - The ID of the VPC.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - gateway
Name String - The name of the Gateway.
- ids List<String>
- A list of Gateway IDs.
- name
Regex String - A regex string to filter results by Gateway name.
- output
File 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
. - vpc
Id String - The ID of the VPC.
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - gateway
Name string - The name of the Gateway.
- ids string[]
- A list of Gateway IDs.
- name
Regex string - A regex string to filter results by Gateway name.
- output
File 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
. - vpc
Id string - The ID of the VPC.
- enable_
details bool - Default to
false
. Set it totrue
can 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.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - gateway
Name String - The name of the Gateway.
- ids List<String>
- A list of Gateway IDs.
- name
Regex String - A regex string to filter results by Gateway name.
- output
File 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
. - vpc
Id 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>
- Enable
Details bool - Gateway
Name string - Name
Regex string - Output
File string - Status string
- Vpc
Id string
- Gateways
[]Get
Gateways Gateway - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Enable
Details bool - Gateway
Name string - Name
Regex string - Output
File string - Status string
- Vpc
Id string
- gateways
List<Get
Gateways Gateway> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- enable
Details Boolean - gateway
Name String - name
Regex String - output
File String - status String
- vpc
Id String
- gateways
Get
Gateways Gateway[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- enable
Details boolean - gateway
Name string - name
Regex string - output
File string - status string
- vpc
Id string
- gateways
Sequence[Get
Gateways 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>
- enable
Details Boolean - gateway
Name String - name
Regex String - output
File String - status String
- vpc
Id String
Supporting Types
GetGatewaysGateway
- Backup
Vswitch stringId - The backup vswitch id.
- Gateway
Name string - The name of the Gateway.
- Gateway
Unique stringId - Gateway unique identification.
- Id string
- The ID of the Gateway.
- Payment
Type string - The payment type of the resource.
- Replica string
- Number of Gateway Nodes.
- Slb
Lists 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.
- Vpc
Id string - The ID of the vpc.
- Vswitch
Id string - The ID of the vswitch.
- Backup
Vswitch stringId - The backup vswitch id.
- Gateway
Name string - The name of the Gateway.
- Gateway
Unique stringId - Gateway unique identification.
- Id string
- The ID of the Gateway.
- Payment
Type string - The payment type of the resource.
- Replica string
- Number of Gateway Nodes.
- Slb
Lists []GetGateways Gateway Slb List - A list of gateway Slb.
- Spec string
- Gateway Node Specifications.
- Status string
- The status of the gateway.
- Vpc
Id string - The ID of the vpc.
- Vswitch
Id string - The ID of the vswitch.
- backup
Vswitch StringId - The backup vswitch id.
- gateway
Name String - The name of the Gateway.
- gateway
Unique StringId - Gateway unique identification.
- id String
- The ID of the Gateway.
- payment
Type String - The payment type of the resource.
- replica String
- Number of Gateway Nodes.
- slb
Lists List<GetGateways Gateway Slb List> - A list of gateway Slb.
- spec String
- Gateway Node Specifications.
- status String
- The status of the gateway.
- vpc
Id String - The ID of the vpc.
- vswitch
Id String - The ID of the vswitch.
- backup
Vswitch stringId - The backup vswitch id.
- gateway
Name string - The name of the Gateway.
- gateway
Unique stringId - Gateway unique identification.
- id string
- The ID of the Gateway.
- payment
Type string - The payment type of the resource.
- replica string
- Number of Gateway Nodes.
- slb
Lists GetGateways Gateway Slb List[] - A list of gateway Slb.
- spec string
- Gateway Node Specifications.
- status string
- The status of the gateway.
- vpc
Id string - The ID of the vpc.
- vswitch
Id 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.
- backup
Vswitch StringId - The backup vswitch id.
- gateway
Name String - The name of the Gateway.
- gateway
Unique StringId - Gateway unique identification.
- id String
- The ID of the Gateway.
- payment
Type String - The payment type of the resource.
- replica String
- Number of Gateway Nodes.
- slb
Lists List<Property Map> - A list of gateway Slb.
- spec String
- Gateway Node Specifications.
- status String
- The status of the gateway.
- vpc
Id String - The ID of the vpc.
- vswitch
Id String - The ID of the vswitch.
GetGatewaysGatewaySlbList
- Associate
Id string - The associate id.
- Gateway
Slb stringMode - The Mode of the gateway slb.
- Gateway
Slb stringStatus - The Status of the gateway slb.
- Gmt
Create string - The creation time of the gateway slb.
- Slb
Id string - The ID of the gateway slb.
- Slb
Ip string - The ip of the gateway slb.
- Slb
Port string - The port of the gateway slb.
- Type string
- The type of the gateway slb.
- Associate
Id string - The associate id.
- Gateway
Slb stringMode - The Mode of the gateway slb.
- Gateway
Slb stringStatus - The Status of the gateway slb.
- Gmt
Create string - The creation time of the gateway slb.
- Slb
Id string - The ID of the gateway slb.
- Slb
Ip string - The ip of the gateway slb.
- Slb
Port string - The port of the gateway slb.
- Type string
- The type of the gateway slb.
- associate
Id String - The associate id.
- gateway
Slb StringMode - The Mode of the gateway slb.
- gateway
Slb StringStatus - The Status of the gateway slb.
- gmt
Create String - The creation time of the gateway slb.
- slb
Id String - The ID of the gateway slb.
- slb
Ip String - The ip of the gateway slb.
- slb
Port String - The port of the gateway slb.
- type String
- The type of the gateway slb.
- associate
Id string - The associate id.
- gateway
Slb stringMode - The Mode of the gateway slb.
- gateway
Slb stringStatus - The Status of the gateway slb.
- gmt
Create string - The creation time of the gateway slb.
- slb
Id string - The ID of the gateway slb.
- slb
Ip string - The ip of the gateway slb.
- slb
Port 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.
- associate
Id String - The associate id.
- gateway
Slb StringMode - The Mode of the gateway slb.
- gateway
Slb StringStatus - The Status of the gateway slb.
- gmt
Create String - The creation time of the gateway slb.
- slb
Id String - The ID of the gateway slb.
- slb
Ip String - The ip of the gateway slb.
- slb
Port 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
alicloud
Terraform Provider.