1. Packages
  2. Volcengine
  3. API Docs
  4. vpn
  5. Gateways
Volcengine v0.0.18 published on Wednesday, Sep 13, 2023 by Volcengine

volcengine.vpn.Gateways

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.18 published on Wednesday, Sep 13, 2023 by Volcengine

    Use this data source to query detailed information of vpn gateways

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    using Volcengine = Volcengine.Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = "cn-beijing-a",
            VpcId = fooVpc.Id,
        });
    
        var fooGateway = new Volcengine.Vpn.Gateway("fooGateway", new()
        {
            VpcId = fooVpc.Id,
            SubnetId = fooSubnet.Id,
            Bandwidth = 20,
            VpnGatewayName = "acc-test",
            Description = "acc-test",
            Period = 2,
            ProjectName = "default",
        });
    
        var fooGateways = Volcengine.Vpn.Gateways.Invoke(new()
        {
            Ids = new[]
            {
                fooGateway.Id,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpn"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     pulumi.String("cn-beijing-a"),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooGateway, err := vpn.NewGateway(ctx, "fooGateway", &vpn.GatewayArgs{
    			VpcId:          fooVpc.ID(),
    			SubnetId:       fooSubnet.ID(),
    			Bandwidth:      pulumi.Int(20),
    			VpnGatewayName: pulumi.String("acc-test"),
    			Description:    pulumi.String("acc-test"),
    			Period:         pulumi.Int(2),
    			ProjectName:    pulumi.String("default"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = vpn.GatewaysOutput(ctx, vpn.GatewaysOutputArgs{
    			Ids: pulumi.StringArray{
    				fooGateway.ID(),
    			},
    		}, nil)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.volcengine.vpc.Vpc;
    import com.pulumi.volcengine.vpc.VpcArgs;
    import com.pulumi.volcengine.vpc.Subnet;
    import com.pulumi.volcengine.vpc.SubnetArgs;
    import com.pulumi.volcengine.vpn.Gateway;
    import com.pulumi.volcengine.vpn.GatewayArgs;
    import com.pulumi.volcengine.vpn.VpnFunctions;
    import com.pulumi.volcengine.vpn.inputs.GatewaysArgs;
    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) {
            var fooVpc = new Vpc("fooVpc", VpcArgs.builder()        
                .vpcName("acc-test-vpc")
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var fooSubnet = new Subnet("fooSubnet", SubnetArgs.builder()        
                .subnetName("acc-test-subnet")
                .cidrBlock("172.16.0.0/24")
                .zoneId("cn-beijing-a")
                .vpcId(fooVpc.id())
                .build());
    
            var fooGateway = new Gateway("fooGateway", GatewayArgs.builder()        
                .vpcId(fooVpc.id())
                .subnetId(fooSubnet.id())
                .bandwidth(20)
                .vpnGatewayName("acc-test")
                .description("acc-test")
                .period(2)
                .projectName("default")
                .build());
    
            final var fooGateways = VpnFunctions.Gateways(GatewaysArgs.builder()
                .ids(fooGateway.id())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id="cn-beijing-a",
        vpc_id=foo_vpc.id)
    foo_gateway = volcengine.vpn.Gateway("fooGateway",
        vpc_id=foo_vpc.id,
        subnet_id=foo_subnet.id,
        bandwidth=20,
        vpn_gateway_name="acc-test",
        description="acc-test",
        period=2,
        project_name="default")
    foo_gateways = volcengine.vpn.gateways_output(ids=[foo_gateway.id])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: "cn-beijing-a",
        vpcId: fooVpc.id,
    });
    const fooGateway = new volcengine.vpn.Gateway("fooGateway", {
        vpcId: fooVpc.id,
        subnetId: fooSubnet.id,
        bandwidth: 20,
        vpnGatewayName: "acc-test",
        description: "acc-test",
        period: 2,
        projectName: "default",
    });
    const fooGateways = volcengine.vpn.GatewaysOutput({
        ids: [fooGateway.id],
    });
    
    resources:
      fooVpc:
        type: volcengine:vpc:Vpc
        properties:
          vpcName: acc-test-vpc
          cidrBlock: 172.16.0.0/16
      fooSubnet:
        type: volcengine:vpc:Subnet
        properties:
          subnetName: acc-test-subnet
          cidrBlock: 172.16.0.0/24
          zoneId: cn-beijing-a
          vpcId: ${fooVpc.id}
      fooGateway:
        type: volcengine:vpn:Gateway
        properties:
          vpcId: ${fooVpc.id}
          subnetId: ${fooSubnet.id}
          bandwidth: 20
          vpnGatewayName: acc-test
          description: acc-test
          period: 2
          projectName: default
    variables:
      fooGateways:
        fn::invoke:
          Function: volcengine:vpn:Gateways
          Arguments:
            ids:
              - ${fooGateway.id}
    

    Using Gateways

    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 gateways(args: GatewaysArgs, opts?: InvokeOptions): Promise<GatewaysResult>
    function gatewaysOutput(args: GatewaysOutputArgs, opts?: InvokeOptions): Output<GatewaysResult>
    def gateways(ids: Optional[Sequence[str]] = None,
                 ip_address: Optional[str] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[str] = None,
                 subnet_id: Optional[str] = None,
                 tags: Optional[Sequence[GatewaysTag]] = None,
                 vpc_id: Optional[str] = None,
                 vpn_gateway_names: Optional[Sequence[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GatewaysResult
    def gateways_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 ip_address: Optional[pulumi.Input[str]] = None,
                 name_regex: Optional[pulumi.Input[str]] = None,
                 output_file: Optional[pulumi.Input[str]] = None,
                 subnet_id: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[GatewaysTagArgs]]]] = None,
                 vpc_id: Optional[pulumi.Input[str]] = None,
                 vpn_gateway_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GatewaysResult]
    func Gateways(ctx *Context, args *GatewaysArgs, opts ...InvokeOption) (*GatewaysResult, error)
    func GatewaysOutput(ctx *Context, args *GatewaysOutputArgs, opts ...InvokeOption) GatewaysResultOutput
    public static class Gateways 
    {
        public static Task<GatewaysResult> InvokeAsync(GatewaysArgs args, InvokeOptions? opts = null)
        public static Output<GatewaysResult> Invoke(GatewaysInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GatewaysResult> gateways(GatewaysArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: volcengine:vpn:Gateways
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>

    A list of VPN gateway ids.

    IpAddress string

    A IP address of the VPN gateway.

    NameRegex string

    A Name Regex of VPN gateway.

    OutputFile string

    File name where to save data source results.

    SubnetId string

    A subnet ID of the VPN gateway.

    Tags List<Volcengine.GatewaysTag>

    Tags.

    VpcId string

    A VPC ID of the VPN gateway.

    VpnGatewayNames List<string>

    A list of VPN gateway names.

    Ids []string

    A list of VPN gateway ids.

    IpAddress string

    A IP address of the VPN gateway.

    NameRegex string

    A Name Regex of VPN gateway.

    OutputFile string

    File name where to save data source results.

    SubnetId string

    A subnet ID of the VPN gateway.

    Tags []GatewaysTag

    Tags.

    VpcId string

    A VPC ID of the VPN gateway.

    VpnGatewayNames []string

    A list of VPN gateway names.

    ids List<String>

    A list of VPN gateway ids.

    ipAddress String

    A IP address of the VPN gateway.

    nameRegex String

    A Name Regex of VPN gateway.

    outputFile String

    File name where to save data source results.

    subnetId String

    A subnet ID of the VPN gateway.

    tags List<GatewaysTag>

    Tags.

    vpcId String

    A VPC ID of the VPN gateway.

    vpnGatewayNames List<String>

    A list of VPN gateway names.

    ids string[]

    A list of VPN gateway ids.

    ipAddress string

    A IP address of the VPN gateway.

    nameRegex string

    A Name Regex of VPN gateway.

    outputFile string

    File name where to save data source results.

    subnetId string

    A subnet ID of the VPN gateway.

    tags GatewaysTag[]

    Tags.

    vpcId string

    A VPC ID of the VPN gateway.

    vpnGatewayNames string[]

    A list of VPN gateway names.

    ids Sequence[str]

    A list of VPN gateway ids.

    ip_address str

    A IP address of the VPN gateway.

    name_regex str

    A Name Regex of VPN gateway.

    output_file str

    File name where to save data source results.

    subnet_id str

    A subnet ID of the VPN gateway.

    tags Sequence[GatewaysTag]

    Tags.

    vpc_id str

    A VPC ID of the VPN gateway.

    vpn_gateway_names Sequence[str]

    A list of VPN gateway names.

    ids List<String>

    A list of VPN gateway ids.

    ipAddress String

    A IP address of the VPN gateway.

    nameRegex String

    A Name Regex of VPN gateway.

    outputFile String

    File name where to save data source results.

    subnetId String

    A subnet ID of the VPN gateway.

    tags List<Property Map>

    Tags.

    vpcId String

    A VPC ID of the VPN gateway.

    vpnGatewayNames List<String>

    A list of VPN gateway names.

    Gateways Result

    The following output properties are available:

    Id string

    The provider-assigned unique ID for this managed resource.

    TotalCount int

    The total count of VPN gateway query.

    VpnGateways List<Volcengine.GatewaysVpnGateway>

    The collection of VPN gateway query.

    Ids List<string>
    IpAddress string

    The IP address of the VPN gateway.

    NameRegex string
    OutputFile string
    SubnetId string
    Tags List<Volcengine.GatewaysTag>

    Tags.

    VpcId string

    The VPC ID of the VPN gateway.

    VpnGatewayNames List<string>
    Id string

    The provider-assigned unique ID for this managed resource.

    TotalCount int

    The total count of VPN gateway query.

    VpnGateways []GatewaysVpnGateway

    The collection of VPN gateway query.

    Ids []string
    IpAddress string

    The IP address of the VPN gateway.

    NameRegex string
    OutputFile string
    SubnetId string
    Tags []GatewaysTag

    Tags.

    VpcId string

    The VPC ID of the VPN gateway.

    VpnGatewayNames []string
    id String

    The provider-assigned unique ID for this managed resource.

    totalCount Integer

    The total count of VPN gateway query.

    vpnGateways List<GatewaysVpnGateway>

    The collection of VPN gateway query.

    ids List<String>
    ipAddress String

    The IP address of the VPN gateway.

    nameRegex String
    outputFile String
    subnetId String
    tags List<GatewaysTag>

    Tags.

    vpcId String

    The VPC ID of the VPN gateway.

    vpnGatewayNames List<String>
    id string

    The provider-assigned unique ID for this managed resource.

    totalCount number

    The total count of VPN gateway query.

    vpnGateways GatewaysVpnGateway[]

    The collection of VPN gateway query.

    ids string[]
    ipAddress string

    The IP address of the VPN gateway.

    nameRegex string
    outputFile string
    subnetId string
    tags GatewaysTag[]

    Tags.

    vpcId string

    The VPC ID of the VPN gateway.

    vpnGatewayNames string[]
    id str

    The provider-assigned unique ID for this managed resource.

    total_count int

    The total count of VPN gateway query.

    vpn_gateways Sequence[GatewaysVpnGateway]

    The collection of VPN gateway query.

    ids Sequence[str]
    ip_address str

    The IP address of the VPN gateway.

    name_regex str
    output_file str
    subnet_id str
    tags Sequence[GatewaysTag]

    Tags.

    vpc_id str

    The VPC ID of the VPN gateway.

    vpn_gateway_names Sequence[str]
    id String

    The provider-assigned unique ID for this managed resource.

    totalCount Number

    The total count of VPN gateway query.

    vpnGateways List<Property Map>

    The collection of VPN gateway query.

    ids List<String>
    ipAddress String

    The IP address of the VPN gateway.

    nameRegex String
    outputFile String
    subnetId String
    tags List<Property Map>

    Tags.

    vpcId String

    The VPC ID of the VPN gateway.

    vpnGatewayNames List<String>

    Supporting Types

    GatewaysTag

    Key string

    The Key of Tags.

    Value string

    The Value of Tags.

    Key string

    The Key of Tags.

    Value string

    The Value of Tags.

    key String

    The Key of Tags.

    value String

    The Value of Tags.

    key string

    The Key of Tags.

    value string

    The Value of Tags.

    key str

    The Key of Tags.

    value str

    The Value of Tags.

    key String

    The Key of Tags.

    value String

    The Value of Tags.

    GatewaysVpnGateway

    AccountId string

    The account ID of the VPN gateway.

    Bandwidth int

    The bandwidth of the VPN gateway.

    BillingType string

    The BillingType of the VPN gateway.

    BusinessStatus string

    The business status of the VPN gateway.

    ConnectionCount int

    The connection count of the VPN gateway.

    CreationTime string

    The create time of VPN gateway.

    DeletedTime string

    The deleted time of the VPN gateway.

    Description string

    The description of the VPN gateway.

    ExpiredTime string

    The expired time of the VPN gateway.

    Id string

    The ID of the VPN gateway.

    IpAddress string

    A IP address of the VPN gateway.

    LockReason string

    The lock reason of the VPN gateway.

    RouteCount int

    The route count of the VPN gateway.

    Status string

    The status of the VPN gateway.

    Tags List<Volcengine.GatewaysVpnGatewayTag>

    Tags.

    UpdateTime string

    The update time of VPN gateway.

    VpcId string

    A VPC ID of the VPN gateway.

    VpnGatewayId string

    The ID of the VPN gateway.

    VpnGatewayName string

    The name of the VPN gateway.

    SubnetId string

    A subnet ID of the VPN gateway.

    AccountId string

    The account ID of the VPN gateway.

    Bandwidth int

    The bandwidth of the VPN gateway.

    BillingType string

    The BillingType of the VPN gateway.

    BusinessStatus string

    The business status of the VPN gateway.

    ConnectionCount int

    The connection count of the VPN gateway.

    CreationTime string

    The create time of VPN gateway.

    DeletedTime string

    The deleted time of the VPN gateway.

    Description string

    The description of the VPN gateway.

    ExpiredTime string

    The expired time of the VPN gateway.

    Id string

    The ID of the VPN gateway.

    IpAddress string

    A IP address of the VPN gateway.

    LockReason string

    The lock reason of the VPN gateway.

    RouteCount int

    The route count of the VPN gateway.

    Status string

    The status of the VPN gateway.

    Tags []GatewaysVpnGatewayTag

    Tags.

    UpdateTime string

    The update time of VPN gateway.

    VpcId string

    A VPC ID of the VPN gateway.

    VpnGatewayId string

    The ID of the VPN gateway.

    VpnGatewayName string

    The name of the VPN gateway.

    SubnetId string

    A subnet ID of the VPN gateway.

    accountId String

    The account ID of the VPN gateway.

    bandwidth Integer

    The bandwidth of the VPN gateway.

    billingType String

    The BillingType of the VPN gateway.

    businessStatus String

    The business status of the VPN gateway.

    connectionCount Integer

    The connection count of the VPN gateway.

    creationTime String

    The create time of VPN gateway.

    deletedTime String

    The deleted time of the VPN gateway.

    description String

    The description of the VPN gateway.

    expiredTime String

    The expired time of the VPN gateway.

    id String

    The ID of the VPN gateway.

    ipAddress String

    A IP address of the VPN gateway.

    lockReason String

    The lock reason of the VPN gateway.

    routeCount Integer

    The route count of the VPN gateway.

    status String

    The status of the VPN gateway.

    tags List<GatewaysVpnGatewayTag>

    Tags.

    updateTime String

    The update time of VPN gateway.

    vpcId String

    A VPC ID of the VPN gateway.

    vpnGatewayId String

    The ID of the VPN gateway.

    vpnGatewayName String

    The name of the VPN gateway.

    subnetId String

    A subnet ID of the VPN gateway.

    accountId string

    The account ID of the VPN gateway.

    bandwidth number

    The bandwidth of the VPN gateway.

    billingType string

    The BillingType of the VPN gateway.

    businessStatus string

    The business status of the VPN gateway.

    connectionCount number

    The connection count of the VPN gateway.

    creationTime string

    The create time of VPN gateway.

    deletedTime string

    The deleted time of the VPN gateway.

    description string

    The description of the VPN gateway.

    expiredTime string

    The expired time of the VPN gateway.

    id string

    The ID of the VPN gateway.

    ipAddress string

    A IP address of the VPN gateway.

    lockReason string

    The lock reason of the VPN gateway.

    routeCount number

    The route count of the VPN gateway.

    status string

    The status of the VPN gateway.

    tags GatewaysVpnGatewayTag[]

    Tags.

    updateTime string

    The update time of VPN gateway.

    vpcId string

    A VPC ID of the VPN gateway.

    vpnGatewayId string

    The ID of the VPN gateway.

    vpnGatewayName string

    The name of the VPN gateway.

    subnetId string

    A subnet ID of the VPN gateway.

    account_id str

    The account ID of the VPN gateway.

    bandwidth int

    The bandwidth of the VPN gateway.

    billing_type str

    The BillingType of the VPN gateway.

    business_status str

    The business status of the VPN gateway.

    connection_count int

    The connection count of the VPN gateway.

    creation_time str

    The create time of VPN gateway.

    deleted_time str

    The deleted time of the VPN gateway.

    description str

    The description of the VPN gateway.

    expired_time str

    The expired time of the VPN gateway.

    id str

    The ID of the VPN gateway.

    ip_address str

    A IP address of the VPN gateway.

    lock_reason str

    The lock reason of the VPN gateway.

    route_count int

    The route count of the VPN gateway.

    status str

    The status of the VPN gateway.

    tags Sequence[GatewaysVpnGatewayTag]

    Tags.

    update_time str

    The update time of VPN gateway.

    vpc_id str

    A VPC ID of the VPN gateway.

    vpn_gateway_id str

    The ID of the VPN gateway.

    vpn_gateway_name str

    The name of the VPN gateway.

    subnet_id str

    A subnet ID of the VPN gateway.

    accountId String

    The account ID of the VPN gateway.

    bandwidth Number

    The bandwidth of the VPN gateway.

    billingType String

    The BillingType of the VPN gateway.

    businessStatus String

    The business status of the VPN gateway.

    connectionCount Number

    The connection count of the VPN gateway.

    creationTime String

    The create time of VPN gateway.

    deletedTime String

    The deleted time of the VPN gateway.

    description String

    The description of the VPN gateway.

    expiredTime String

    The expired time of the VPN gateway.

    id String

    The ID of the VPN gateway.

    ipAddress String

    A IP address of the VPN gateway.

    lockReason String

    The lock reason of the VPN gateway.

    routeCount Number

    The route count of the VPN gateway.

    status String

    The status of the VPN gateway.

    tags List<Property Map>

    Tags.

    updateTime String

    The update time of VPN gateway.

    vpcId String

    A VPC ID of the VPN gateway.

    vpnGatewayId String

    The ID of the VPN gateway.

    vpnGatewayName String

    The name of the VPN gateway.

    subnetId String

    A subnet ID of the VPN gateway.

    GatewaysVpnGatewayTag

    Key string

    The Key of Tags.

    Value string

    The Value of Tags.

    Key string

    The Key of Tags.

    Value string

    The Value of Tags.

    key String

    The Key of Tags.

    value String

    The Value of Tags.

    key string

    The Key of Tags.

    value string

    The Value of Tags.

    key str

    The Key of Tags.

    value str

    The Value of Tags.

    key String

    The Key of Tags.

    value String

    The Value of Tags.

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the volcengine Terraform Provider.

    volcengine logo
    Volcengine v0.0.18 published on Wednesday, Sep 13, 2023 by Volcengine