1. Packages
  2. Scaleway
  3. API Docs
  4. getVpcPublicGateway
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

scaleway.getVpcPublicGateway

Explore with Pulumi AI

scaleway logo
Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse

    Gets information about a Public Gateway.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    import * as scaleway from "@pulumiverse/scaleway";
    
    const main = new scaleway.VpcPublicGateway("main", {
        name: "demo",
        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,
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    import pulumiverse_scaleway as scaleway
    
    main = scaleway.VpcPublicGateway("main",
        name="demo",
        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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		main, err := scaleway.NewVpcPublicGateway(ctx, "main", &scaleway.VpcPublicGatewayArgs{
    			Name: pulumi.String("demo"),
    			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
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    using Scaleway = Pulumiverse.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        var main = new Scaleway.VpcPublicGateway("main", new()
        {
            Name = "demo",
            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 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()
                .name("demo")
                .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());
    
        }
    }
    
    resources:
      main:
        type: scaleway:VpcPublicGateway
        properties:
          name: demo
          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,
                               project_id: 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,
                               project_id: 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.
    ProjectId string
    The ID of the Project the Public Gateway is associated with.
    PublicGatewayId string
    Zone string
    zone) The Public Gateway's zone.
    Name string
    Exact name of the Public Gateway.
    ProjectId string
    The ID of the Project the Public Gateway is associated with.
    PublicGatewayId string
    Zone string
    zone) The Public Gateway's zone.
    name String
    Exact name of the Public Gateway.
    projectId String
    The ID of the Project the Public Gateway is associated with.
    publicGatewayId String
    zone String
    zone) The Public Gateway's zone.
    name string
    Exact name of the Public Gateway.
    projectId string
    The ID of the Project the Public Gateway is associated with.
    publicGatewayId string
    zone string
    zone) The Public Gateway's zone.
    name str
    Exact name of the Public Gateway.
    project_id str
    The ID of the Project the Public Gateway is associated with.
    public_gateway_id str
    zone str
    zone) The Public Gateway's zone.
    name String
    Exact name of the Public Gateway.
    projectId String
    The ID of the Project the Public Gateway is associated with.
    publicGatewayId String
    zone String
    zone) The Public Gateway's zone.

    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
    RefreshSshKeys string
    Status string
    Tags List<string>
    Type string
    UpdatedAt string
    UpstreamDnsServers List<string>
    Name string
    ProjectId 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
    RefreshSshKeys string
    Status string
    Tags []string
    Type string
    UpdatedAt string
    UpstreamDnsServers []string
    Name string
    ProjectId 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
    refreshSshKeys String
    status String
    tags List<String>
    type String
    updatedAt String
    upstreamDnsServers List<String>
    name String
    projectId 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
    refreshSshKeys string
    status string
    tags string[]
    type string
    updatedAt string
    upstreamDnsServers string[]
    name string
    projectId 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
    refresh_ssh_keys str
    status str
    tags Sequence[str]
    type str
    updated_at str
    upstream_dns_servers Sequence[str]
    name str
    project_id 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
    refreshSshKeys String
    status String
    tags List<String>
    type String
    updatedAt String
    upstreamDnsServers List<String>
    name String
    projectId String
    publicGatewayId String
    zone String

    Package Details

    Repository
    scaleway pulumiverse/pulumi-scaleway
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the scaleway Terraform Provider.
    scaleway logo
    Scaleway v1.20.0 published on Monday, Nov 4, 2024 by pulumiverse