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

scaleway.getVpcPrivateNetwork

Explore with Pulumi AI

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

    Gets information about a Private Network.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    // Get info by name
    const myName = scaleway.getVpcPrivateNetwork({
        name: "foobar",
    });
    // Get info by name and VPC ID
    const myNameAndVpcId = scaleway.getVpcPrivateNetwork({
        name: "foobar",
        vpcId: "11111111-1111-1111-1111-111111111111",
    });
    // Get info by IP ID
    const myId = scaleway.getVpcPrivateNetwork({
        privateNetworkId: "11111111-1111-1111-1111-111111111111",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    # Get info by name
    my_name = scaleway.get_vpc_private_network(name="foobar")
    # Get info by name and VPC ID
    my_name_and_vpc_id = scaleway.get_vpc_private_network(name="foobar",
        vpc_id="11111111-1111-1111-1111-111111111111")
    # Get info by IP ID
    my_id = scaleway.get_vpc_private_network(private_network_id="11111111-1111-1111-1111-111111111111")
    
    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 {
    		// Get info by name
    		_, err := scaleway.LookupVpcPrivateNetwork(ctx, &scaleway.LookupVpcPrivateNetworkArgs{
    			Name: pulumi.StringRef("foobar"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Get info by name and VPC ID
    		_, err = scaleway.LookupVpcPrivateNetwork(ctx, &scaleway.LookupVpcPrivateNetworkArgs{
    			Name:  pulumi.StringRef("foobar"),
    			VpcId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		// Get info by IP ID
    		_, err = scaleway.LookupVpcPrivateNetwork(ctx, &scaleway.LookupVpcPrivateNetworkArgs{
    			PrivateNetworkId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Scaleway = Pulumi.Scaleway;
    
    return await Deployment.RunAsync(() => 
    {
        // Get info by name
        var myName = Scaleway.GetVpcPrivateNetwork.Invoke(new()
        {
            Name = "foobar",
        });
    
        // Get info by name and VPC ID
        var myNameAndVpcId = Scaleway.GetVpcPrivateNetwork.Invoke(new()
        {
            Name = "foobar",
            VpcId = "11111111-1111-1111-1111-111111111111",
        });
    
        // Get info by IP ID
        var myId = Scaleway.GetVpcPrivateNetwork.Invoke(new()
        {
            PrivateNetworkId = "11111111-1111-1111-1111-111111111111",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.scaleway.ScalewayFunctions;
    import com.pulumi.scaleway.inputs.GetVpcPrivateNetworkArgs;
    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) {
            // Get info by name
            final var myName = ScalewayFunctions.getVpcPrivateNetwork(GetVpcPrivateNetworkArgs.builder()
                .name("foobar")
                .build());
    
            // Get info by name and VPC ID
            final var myNameAndVpcId = ScalewayFunctions.getVpcPrivateNetwork(GetVpcPrivateNetworkArgs.builder()
                .name("foobar")
                .vpcId("11111111-1111-1111-1111-111111111111")
                .build());
    
            // Get info by IP ID
            final var myId = ScalewayFunctions.getVpcPrivateNetwork(GetVpcPrivateNetworkArgs.builder()
                .privateNetworkId("11111111-1111-1111-1111-111111111111")
                .build());
    
        }
    }
    
    variables:
      # Get info by name
      myName:
        fn::invoke:
          Function: scaleway:getVpcPrivateNetwork
          Arguments:
            name: foobar
      # Get info by name and VPC ID
      myNameAndVpcId:
        fn::invoke:
          Function: scaleway:getVpcPrivateNetwork
          Arguments:
            name: foobar
            vpcId: 11111111-1111-1111-1111-111111111111
      # Get info by IP ID
      myId:
        fn::invoke:
          Function: scaleway:getVpcPrivateNetwork
          Arguments:
            privateNetworkId: 11111111-1111-1111-1111-111111111111
    

    Using getVpcPrivateNetwork

    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 getVpcPrivateNetwork(args: GetVpcPrivateNetworkArgs, opts?: InvokeOptions): Promise<GetVpcPrivateNetworkResult>
    function getVpcPrivateNetworkOutput(args: GetVpcPrivateNetworkOutputArgs, opts?: InvokeOptions): Output<GetVpcPrivateNetworkResult>
    def get_vpc_private_network(name: Optional[str] = None,
                                private_network_id: Optional[str] = None,
                                project_id: Optional[str] = None,
                                region: Optional[str] = None,
                                vpc_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetVpcPrivateNetworkResult
    def get_vpc_private_network_output(name: Optional[pulumi.Input[str]] = None,
                                private_network_id: Optional[pulumi.Input[str]] = None,
                                project_id: Optional[pulumi.Input[str]] = None,
                                region: Optional[pulumi.Input[str]] = None,
                                vpc_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetVpcPrivateNetworkResult]
    func LookupVpcPrivateNetwork(ctx *Context, args *LookupVpcPrivateNetworkArgs, opts ...InvokeOption) (*LookupVpcPrivateNetworkResult, error)
    func LookupVpcPrivateNetworkOutput(ctx *Context, args *LookupVpcPrivateNetworkOutputArgs, opts ...InvokeOption) LookupVpcPrivateNetworkResultOutput

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

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

    The following arguments are supported:

    Name string
    Name of the Private Network. Cannot be used with private_network_id.
    PrivateNetworkId string
    ID of the Private Network. Cannot be used with name or vpc_id.
    ProjectId string
    The ID of the Project the Private Network is associated with.
    Region string
    VpcId string
    ID of the VPC the Private Network is in. Cannot be used with private_network_id.
    Name string
    Name of the Private Network. Cannot be used with private_network_id.
    PrivateNetworkId string
    ID of the Private Network. Cannot be used with name or vpc_id.
    ProjectId string
    The ID of the Project the Private Network is associated with.
    Region string
    VpcId string
    ID of the VPC the Private Network is in. Cannot be used with private_network_id.
    name String
    Name of the Private Network. Cannot be used with private_network_id.
    privateNetworkId String
    ID of the Private Network. Cannot be used with name or vpc_id.
    projectId String
    The ID of the Project the Private Network is associated with.
    region String
    vpcId String
    ID of the VPC the Private Network is in. Cannot be used with private_network_id.
    name string
    Name of the Private Network. Cannot be used with private_network_id.
    privateNetworkId string
    ID of the Private Network. Cannot be used with name or vpc_id.
    projectId string
    The ID of the Project the Private Network is associated with.
    region string
    vpcId string
    ID of the VPC the Private Network is in. Cannot be used with private_network_id.
    name str
    Name of the Private Network. Cannot be used with private_network_id.
    private_network_id str
    ID of the Private Network. Cannot be used with name or vpc_id.
    project_id str
    The ID of the Project the Private Network is associated with.
    region str
    vpc_id str
    ID of the VPC the Private Network is in. Cannot be used with private_network_id.
    name String
    Name of the Private Network. Cannot be used with private_network_id.
    privateNetworkId String
    ID of the Private Network. Cannot be used with name or vpc_id.
    projectId String
    The ID of the Project the Private Network is associated with.
    region String
    vpcId String
    ID of the VPC the Private Network is in. Cannot be used with private_network_id.

    getVpcPrivateNetwork Result

    The following output properties are available:

    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv4Subnets List<Pulumiverse.Scaleway.Outputs.GetVpcPrivateNetworkIpv4Subnet>
    The IPv4 subnet associated with the Private Network.
    Ipv6Subnets List<Pulumiverse.Scaleway.Outputs.GetVpcPrivateNetworkIpv6Subnet>
    The IPv6 subnets associated with the Private Network.
    IsRegional bool
    OrganizationId string
    Tags List<string>
    UpdatedAt string
    Zone string
    Name string
    PrivateNetworkId string
    ProjectId string
    Region string
    VpcId string
    CreatedAt string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv4Subnets []GetVpcPrivateNetworkIpv4Subnet
    The IPv4 subnet associated with the Private Network.
    Ipv6Subnets []GetVpcPrivateNetworkIpv6Subnet
    The IPv6 subnets associated with the Private Network.
    IsRegional bool
    OrganizationId string
    Tags []string
    UpdatedAt string
    Zone string
    Name string
    PrivateNetworkId string
    ProjectId string
    Region string
    VpcId string
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv4Subnets List<GetVpcPrivateNetworkIpv4Subnet>
    The IPv4 subnet associated with the Private Network.
    ipv6Subnets List<GetVpcPrivateNetworkIpv6Subnet>
    The IPv6 subnets associated with the Private Network.
    isRegional Boolean
    organizationId String
    tags List<String>
    updatedAt String
    zone String
    name String
    privateNetworkId String
    projectId String
    region String
    vpcId String
    createdAt string
    id string
    The provider-assigned unique ID for this managed resource.
    ipv4Subnets GetVpcPrivateNetworkIpv4Subnet[]
    The IPv4 subnet associated with the Private Network.
    ipv6Subnets GetVpcPrivateNetworkIpv6Subnet[]
    The IPv6 subnets associated with the Private Network.
    isRegional boolean
    organizationId string
    tags string[]
    updatedAt string
    zone string
    name string
    privateNetworkId string
    projectId string
    region string
    vpcId string
    created_at str
    id str
    The provider-assigned unique ID for this managed resource.
    ipv4_subnets Sequence[GetVpcPrivateNetworkIpv4Subnet]
    The IPv4 subnet associated with the Private Network.
    ipv6_subnets Sequence[GetVpcPrivateNetworkIpv6Subnet]
    The IPv6 subnets associated with the Private Network.
    is_regional bool
    organization_id str
    tags Sequence[str]
    updated_at str
    zone str
    name str
    private_network_id str
    project_id str
    region str
    vpc_id str
    createdAt String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv4Subnets List<Property Map>
    The IPv4 subnet associated with the Private Network.
    ipv6Subnets List<Property Map>
    The IPv6 subnets associated with the Private Network.
    isRegional Boolean
    organizationId String
    tags List<String>
    updatedAt String
    zone String
    name String
    privateNetworkId String
    projectId String
    region String
    vpcId String

    Supporting Types

    GetVpcPrivateNetworkIpv4Subnet

    Address string
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    CreatedAt string
    The date and time of the creation of the subnet
    Id string
    The ID of the Private Network.
    PrefixLength int
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    Subnet string
    The subnet CIDR
    SubnetMask string
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    UpdatedAt string
    The date and time of the last update of the subnet
    Address string
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    CreatedAt string
    The date and time of the creation of the subnet
    Id string
    The ID of the Private Network.
    PrefixLength int
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    Subnet string
    The subnet CIDR
    SubnetMask string
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    UpdatedAt string
    The date and time of the last update of the subnet
    address String
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    createdAt String
    The date and time of the creation of the subnet
    id String
    The ID of the Private Network.
    prefixLength Integer
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet String
    The subnet CIDR
    subnetMask String
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updatedAt String
    The date and time of the last update of the subnet
    address string
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    createdAt string
    The date and time of the creation of the subnet
    id string
    The ID of the Private Network.
    prefixLength number
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet string
    The subnet CIDR
    subnetMask string
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updatedAt string
    The date and time of the last update of the subnet
    address str
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    created_at str
    The date and time of the creation of the subnet
    id str
    The ID of the Private Network.
    prefix_length int
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet str
    The subnet CIDR
    subnet_mask str
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updated_at str
    The date and time of the last update of the subnet
    address String
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    createdAt String
    The date and time of the creation of the subnet
    id String
    The ID of the Private Network.
    prefixLength Number
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet String
    The subnet CIDR
    subnetMask String
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updatedAt String
    The date and time of the last update of the subnet

    GetVpcPrivateNetworkIpv6Subnet

    Address string
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    CreatedAt string
    The date and time of the creation of the subnet
    Id string
    The ID of the Private Network.
    PrefixLength int
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    Subnet string
    The subnet CIDR
    SubnetMask string
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    UpdatedAt string
    The date and time of the last update of the subnet
    Address string
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    CreatedAt string
    The date and time of the creation of the subnet
    Id string
    The ID of the Private Network.
    PrefixLength int
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    Subnet string
    The subnet CIDR
    SubnetMask string
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    UpdatedAt string
    The date and time of the last update of the subnet
    address String
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    createdAt String
    The date and time of the creation of the subnet
    id String
    The ID of the Private Network.
    prefixLength Integer
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet String
    The subnet CIDR
    subnetMask String
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updatedAt String
    The date and time of the last update of the subnet
    address string
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    createdAt string
    The date and time of the creation of the subnet
    id string
    The ID of the Private Network.
    prefixLength number
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet string
    The subnet CIDR
    subnetMask string
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updatedAt string
    The date and time of the last update of the subnet
    address str
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    created_at str
    The date and time of the creation of the subnet
    id str
    The ID of the Private Network.
    prefix_length int
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet str
    The subnet CIDR
    subnet_mask str
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updated_at str
    The date and time of the last update of the subnet
    address String
    The network address of the subnet in dotted decimal notation, e.g., '192.168.0.0' for a '192.168.0.0/24' subnet
    createdAt String
    The date and time of the creation of the subnet
    id String
    The ID of the Private Network.
    prefixLength Number
    The length of the network prefix, e.g., 24 for a 255.255.255.0 mask
    subnet String
    The subnet CIDR
    subnetMask String
    The subnet mask expressed in dotted decimal notation, e.g., '255.255.255.0' for a /24 subnet
    updatedAt String
    The date and time of the last update of the subnet

    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