1. Packages
  2. Scaleway
  3. API Docs
  4. getVpcPublicGateway
Scaleway v1.11.0 published on Sunday, Oct 29, 2023 by lbrlabs

scaleway.getVpcPublicGateway

Explore with Pulumi AI

scaleway logo
Scaleway v1.11.0 published on Sunday, Oct 29, 2023 by lbrlabs

    Gets information about a public gateway.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Lbrlabs.PulumiPackage.Scaleway;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.VpcPublicGateway("main", new()
        {
            Type = "VPC-GW-S",
            Zone = "nl-ams-1",
        });
    
        var pgTestByName = Scaleway.GetVpcPublicGateway.Invoke(new()
        {
            Name = main.Name,
            Zone = "nl-ams-1",
        });
    
        var pgTestById = Scaleway.GetVpcPublicGateway.Invoke(new()
        {
            PublicGatewayId = main.Id,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-scaleway/sdk/go/scaleway"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := scaleway.NewVpcPublicGateway(ctx, "main", &scaleway.VpcPublicGatewayArgs{
    			Type: pulumi.String("VPC-GW-S"),
    			Zone: pulumi.String("nl-ams-1"),
    		})
    		if err != nil {
    			return err
    		}
    		_ = scaleway.LookupVpcPublicGatewayOutput(ctx, scaleway.GetVpcPublicGatewayOutputArgs{
    			Name: main.Name,
    			Zone: pulumi.String("nl-ams-1"),
    		}, nil)
    		_ = scaleway.LookupVpcPublicGatewayOutput(ctx, scaleway.GetVpcPublicGatewayOutputArgs{
    			PublicGatewayId: main.ID(),
    		}, nil)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.VpcPublicGateway;
    import com.pulumi.scaleway.VpcPublicGatewayArgs;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetVpcPublicGatewayArgs;
    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 main = new VpcPublicGateway("main", VpcPublicGatewayArgs.builder()        
                .type("VPC-GW-S")
                .zone("nl-ams-1")
                .build());
    
            final var pgTestByName = ScalewayFunctions.getVpcPublicGateway(GetVpcPublicGatewayArgs.builder()
                .name(main.name())
                .zone("nl-ams-1")
                .build());
    
            final var pgTestById = ScalewayFunctions.getVpcPublicGateway(GetVpcPublicGatewayArgs.builder()
                .publicGatewayId(main.id())
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_scaleway as scaleway
    import pulumi_scaleway as scaleway
    
    main = scaleway.VpcPublicGateway("main",
        type="VPC-GW-S",
        zone="nl-ams-1")
    pg_test_by_name = scaleway.get_vpc_public_gateway_output(name=main.name,
        zone="nl-ams-1")
    pg_test_by_id = scaleway.get_vpc_public_gateway_output(public_gateway_id=main.id)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@lbrlabs/pulumi-scaleway";
    import * as scaleway from "@pulumi/scaleway";
    
    const main = new scaleway.VpcPublicGateway("main", {
        type: "VPC-GW-S",
        zone: "nl-ams-1",
    });
    const pgTestByName = scaleway.getVpcPublicGatewayOutput({
        name: main.name,
        zone: "nl-ams-1",
    });
    const pgTestById = scaleway.getVpcPublicGatewayOutput({
        publicGatewayId: main.id,
    });
    
    resources:
      main:
        type: scaleway:VpcPublicGateway
        properties:
          type: VPC-GW-S
          zone: nl-ams-1
    variables:
      pgTestByName:
        fn::invoke:
          Function: scaleway:getVpcPublicGateway
          Arguments:
            name: ${main.name}
            zone: nl-ams-1
      pgTestById:
        fn::invoke:
          Function: scaleway:getVpcPublicGateway
          Arguments:
            publicGatewayId: ${main.id}
    

    Using getVpcPublicGateway

    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 getVpcPublicGateway(args: GetVpcPublicGatewayArgs, opts?: InvokeOptions): Promise<GetVpcPublicGatewayResult>
    function getVpcPublicGatewayOutput(args: GetVpcPublicGatewayOutputArgs, opts?: InvokeOptions): Output<GetVpcPublicGatewayResult>
    def get_vpc_public_gateway(name: Optional[str] = None,
                               public_gateway_id: Optional[str] = None,
                               zone: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetVpcPublicGatewayResult
    def get_vpc_public_gateway_output(name: Optional[pulumi.Input[str]] = None,
                               public_gateway_id: Optional[pulumi.Input[str]] = None,
                               zone: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetVpcPublicGatewayResult]
    func LookupVpcPublicGateway(ctx *Context, args *LookupVpcPublicGatewayArgs, opts ...InvokeOption) (*LookupVpcPublicGatewayResult, error)
    func LookupVpcPublicGatewayOutput(ctx *Context, args *LookupVpcPublicGatewayOutputArgs, opts ...InvokeOption) LookupVpcPublicGatewayResultOutput

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

    public static class GetVpcPublicGateway 
    {
        public static Task<GetVpcPublicGatewayResult> InvokeAsync(GetVpcPublicGatewayArgs args, InvokeOptions? opts = null)
        public static Output<GetVpcPublicGatewayResult> Invoke(GetVpcPublicGatewayInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVpcPublicGatewayResult> getVpcPublicGateway(GetVpcPublicGatewayArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: scaleway:index/getVpcPublicGateway:getVpcPublicGateway
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Exact name of the public gateway.
    PublicGatewayId string
    Zone string
    zone) The zone in which the public gateway should be created.
    Name string
    Exact name of the public gateway.
    PublicGatewayId string
    Zone string
    zone) The zone in which the public gateway should be created.
    name String
    Exact name of the public gateway.
    publicGatewayId String
    zone String
    zone) The zone in which the public gateway should be created.
    name string
    Exact name of the public gateway.
    publicGatewayId string
    zone string
    zone) The zone in which the public gateway should be created.
    name str
    Exact name of the public gateway.
    public_gateway_id str
    zone str
    zone) The zone in which the public gateway should be created.
    name String
    Exact name of the public gateway.
    publicGatewayId String
    zone String
    zone) The zone in which the public gateway should be created.

    getVpcPublicGateway Result

    The following output properties are available:

    BastionEnabled bool
    BastionPort int
    CreatedAt string
    EnableSmtp bool
    Id string
    The provider-assigned unique ID for this managed resource.
    IpId string
    OrganizationId string
    ProjectId string
    Tags List<string>
    Type string
    UpdatedAt string
    UpstreamDnsServers List<string>
    Name string
    PublicGatewayId string
    Zone string
    BastionEnabled bool
    BastionPort int
    CreatedAt string
    EnableSmtp bool
    Id string
    The provider-assigned unique ID for this managed resource.
    IpId string
    OrganizationId string
    ProjectId string
    Tags []string
    Type string
    UpdatedAt string
    UpstreamDnsServers []string
    Name string
    PublicGatewayId string
    Zone string
    bastionEnabled Boolean
    bastionPort Integer
    createdAt String
    enableSmtp Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    ipId String
    organizationId String
    projectId String
    tags List<String>
    type String
    updatedAt String
    upstreamDnsServers List<String>
    name String
    publicGatewayId String
    zone String
    bastionEnabled boolean
    bastionPort number
    createdAt string
    enableSmtp boolean
    id string
    The provider-assigned unique ID for this managed resource.
    ipId string
    organizationId string
    projectId string
    tags string[]
    type string
    updatedAt string
    upstreamDnsServers string[]
    name string
    publicGatewayId string
    zone string
    bastion_enabled bool
    bastion_port int
    created_at str
    enable_smtp bool
    id str
    The provider-assigned unique ID for this managed resource.
    ip_id str
    organization_id str
    project_id str
    tags Sequence[str]
    type str
    updated_at str
    upstream_dns_servers Sequence[str]
    name str
    public_gateway_id str
    zone str
    bastionEnabled Boolean
    bastionPort Number
    createdAt String
    enableSmtp Boolean
    id String
    The provider-assigned unique ID for this managed resource.
    ipId String
    organizationId String
    projectId String
    tags List<String>
    type String
    updatedAt String
    upstreamDnsServers List<String>
    name String
    publicGatewayId String
    zone String

    Package Details

    Repository
    scaleway lbrlabs/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.11.0 published on Sunday, Oct 29, 2023 by lbrlabs