1. Packages
  2. Scaleway
  3. API Docs
  4. network
  5. getPublicGateway
Scaleway v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse

scaleway.network.getPublicGateway

Explore with Pulumi AI

Scaleway v1.26.0 published on Friday, Mar 28, 2025 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.network.PublicGateway("main", {
    name: "demo",
    type: "VPC-GW-S",
    zone: "nl-ams-1",
});
const pgTestByName = scaleway.network.getPublicGatewayOutput({
    name: main.name,
    zone: "nl-ams-1",
});
const pgTestById = scaleway.network.getPublicGatewayOutput({
    publicGatewayId: main.id,
});
Copy
import pulumi
import pulumi_scaleway as scaleway
import pulumiverse_scaleway as scaleway

main = scaleway.network.PublicGateway("main",
    name="demo",
    type="VPC-GW-S",
    zone="nl-ams-1")
pg_test_by_name = scaleway.network.get_public_gateway_output(name=main.name,
    zone="nl-ams-1")
pg_test_by_id = scaleway.network.get_public_gateway_output(public_gateway_id=main.id)
Copy
package main

import (
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
	"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway/network"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		main, err := network.NewPublicGateway(ctx, "main", &network.PublicGatewayArgs{
			Name: pulumi.String("demo"),
			Type: pulumi.String("VPC-GW-S"),
			Zone: pulumi.String("nl-ams-1"),
		})
		if err != nil {
			return err
		}
		_ = network.LookupPublicGatewayOutput(ctx, network.GetPublicGatewayOutputArgs{
			Name: main.Name,
			Zone: pulumi.String("nl-ams-1"),
		}, nil)
		_ = network.LookupPublicGatewayOutput(ctx, network.GetPublicGatewayOutputArgs{
			PublicGatewayId: main.ID(),
		}, nil)
		return nil
	})
}
Copy
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.Network.PublicGateway("main", new()
    {
        Name = "demo",
        Type = "VPC-GW-S",
        Zone = "nl-ams-1",
    });

    var pgTestByName = Scaleway.Network.GetPublicGateway.Invoke(new()
    {
        Name = main.Name,
        Zone = "nl-ams-1",
    });

    var pgTestById = Scaleway.Network.GetPublicGateway.Invoke(new()
    {
        PublicGatewayId = main.Id,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.network.PublicGateway;
import com.pulumi.scaleway.network.PublicGatewayArgs;
import com.pulumi.scaleway.network.NetworkFunctions;
import com.pulumi.scaleway.network.inputs.GetPublicGatewayArgs;
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 PublicGateway("main", PublicGatewayArgs.builder()
            .name("demo")
            .type("VPC-GW-S")
            .zone("nl-ams-1")
            .build());

        final var pgTestByName = NetworkFunctions.getPublicGateway(GetPublicGatewayArgs.builder()
            .name(main.name())
            .zone("nl-ams-1")
            .build());

        final var pgTestById = NetworkFunctions.getPublicGateway(GetPublicGatewayArgs.builder()
            .publicGatewayId(main.id())
            .build());

    }
}
Copy
resources:
  main:
    type: scaleway:network:PublicGateway
    properties:
      name: demo
      type: VPC-GW-S
      zone: nl-ams-1
variables:
  pgTestByName:
    fn::invoke:
      function: scaleway:network:getPublicGateway
      arguments:
        name: ${main.name}
        zone: nl-ams-1
  pgTestById:
    fn::invoke:
      function: scaleway:network:getPublicGateway
      arguments:
        publicGatewayId: ${main.id}
Copy

Using getPublicGateway

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 getPublicGateway(args: GetPublicGatewayArgs, opts?: InvokeOptions): Promise<GetPublicGatewayResult>
function getPublicGatewayOutput(args: GetPublicGatewayOutputArgs, opts?: InvokeOptions): Output<GetPublicGatewayResult>
Copy
def get_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) -> GetPublicGatewayResult
def get_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[GetPublicGatewayResult]
Copy
func LookupPublicGateway(ctx *Context, args *LookupPublicGatewayArgs, opts ...InvokeOption) (*LookupPublicGatewayResult, error)
func LookupPublicGatewayOutput(ctx *Context, args *LookupPublicGatewayOutputArgs, opts ...InvokeOption) LookupPublicGatewayResultOutput
Copy

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

public static class GetPublicGateway 
{
    public static Task<GetPublicGatewayResult> InvokeAsync(GetPublicGatewayArgs args, InvokeOptions? opts = null)
    public static Output<GetPublicGatewayResult> Invoke(GetPublicGatewayInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetPublicGatewayResult> getPublicGateway(GetPublicGatewayArgs args, InvokeOptions options)
public static Output<GetPublicGatewayResult> getPublicGateway(GetPublicGatewayArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: scaleway:network/getPublicGateway:getPublicGateway
  arguments:
    # arguments dictionary
Copy

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.

getPublicGateway Result

The following output properties are available:

AllowedIpRanges List<string>
Bandwidth int
BastionEnabled bool
BastionPort int
CreatedAt string
EnableSmtp bool
Id string
The provider-assigned unique ID for this managed resource.
IpId string
MoveToIpam bool
OrganizationId string
RefreshSshKeys string
Status string
Tags List<string>
Type string
UpdatedAt string
UpstreamDnsServers List<string>
Name string
ProjectId string
PublicGatewayId string
Zone string
AllowedIpRanges []string
Bandwidth int
BastionEnabled bool
BastionPort int
CreatedAt string
EnableSmtp bool
Id string
The provider-assigned unique ID for this managed resource.
IpId string
MoveToIpam bool
OrganizationId string
RefreshSshKeys string
Status string
Tags []string
Type string
UpdatedAt string
UpstreamDnsServers []string
Name string
ProjectId string
PublicGatewayId string
Zone string
allowedIpRanges List<String>
bandwidth Integer
bastionEnabled Boolean
bastionPort Integer
createdAt String
enableSmtp Boolean
id String
The provider-assigned unique ID for this managed resource.
ipId String
moveToIpam Boolean
organizationId String
refreshSshKeys String
status String
tags List<String>
type String
updatedAt String
upstreamDnsServers List<String>
name String
projectId String
publicGatewayId String
zone String
allowedIpRanges string[]
bandwidth number
bastionEnabled boolean
bastionPort number
createdAt string
enableSmtp boolean
id string
The provider-assigned unique ID for this managed resource.
ipId string
moveToIpam boolean
organizationId string
refreshSshKeys string
status string
tags string[]
type string
updatedAt string
upstreamDnsServers string[]
name string
projectId string
publicGatewayId string
zone string
allowed_ip_ranges Sequence[str]
bandwidth int
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
move_to_ipam bool
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
allowedIpRanges List<String>
bandwidth Number
bastionEnabled Boolean
bastionPort Number
createdAt String
enableSmtp Boolean
id String
The provider-assigned unique ID for this managed resource.
ipId String
moveToIpam Boolean
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 v1.26.0 published on Friday, Mar 28, 2025 by pulumiverse