Scaleway v1.14.0 published on Thursday, Jun 6, 2024 by pulumiverse
scaleway.getVpc
Explore with Pulumi AI
Gets information about a Scaleway Virtual Private Cloud.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumi/scaleway";
const byName = scaleway.getVpc({
    name: "foobar",
});
const byId = scaleway.getVpc({
    vpcId: "11111111-1111-1111-1111-111111111111",
});
const default = scaleway.getVpc({
    isDefault: true,
});
import pulumi
import pulumi_scaleway as scaleway
by_name = scaleway.get_vpc(name="foobar")
by_id = scaleway.get_vpc(vpc_id="11111111-1111-1111-1111-111111111111")
default = scaleway.get_vpc(is_default=True)
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 {
		_, err := scaleway.LookupVpc(ctx, &scaleway.LookupVpcArgs{
			Name: pulumi.StringRef("foobar"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = scaleway.LookupVpc(ctx, &scaleway.LookupVpcArgs{
			VpcId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
		}, nil)
		if err != nil {
			return err
		}
		_, err = scaleway.LookupVpc(ctx, &scaleway.LookupVpcArgs{
			IsDefault: pulumi.BoolRef(true),
		}, 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(() => 
{
    var byName = Scaleway.GetVpc.Invoke(new()
    {
        Name = "foobar",
    });
    var byId = Scaleway.GetVpc.Invoke(new()
    {
        VpcId = "11111111-1111-1111-1111-111111111111",
    });
    var @default = Scaleway.GetVpc.Invoke(new()
    {
        IsDefault = true,
    });
});
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.GetVpcArgs;
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) {
        final var byName = ScalewayFunctions.getVpc(GetVpcArgs.builder()
            .name("foobar")
            .build());
        final var byId = ScalewayFunctions.getVpc(GetVpcArgs.builder()
            .vpcId("11111111-1111-1111-1111-111111111111")
            .build());
        final var default = ScalewayFunctions.getVpc(GetVpcArgs.builder()
            .isDefault(true)
            .build());
    }
}
variables:
  byName:
    fn::invoke:
      Function: scaleway:getVpc
      Arguments:
        name: foobar
  byId:
    fn::invoke:
      Function: scaleway:getVpc
      Arguments:
        vpcId: 11111111-1111-1111-1111-111111111111
  default:
    fn::invoke:
      Function: scaleway:getVpc
      Arguments:
        isDefault: true
Using getVpc
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 getVpc(args: GetVpcArgs, opts?: InvokeOptions): Promise<GetVpcResult>
function getVpcOutput(args: GetVpcOutputArgs, opts?: InvokeOptions): Output<GetVpcResult>def get_vpc(is_default: Optional[bool] = None,
            name: Optional[str] = None,
            organization_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            vpc_id: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetVpcResult
def get_vpc_output(is_default: Optional[pulumi.Input[bool]] = None,
            name: Optional[pulumi.Input[str]] = None,
            organization_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[GetVpcResult]func LookupVpc(ctx *Context, args *LookupVpcArgs, opts ...InvokeOption) (*LookupVpcResult, error)
func LookupVpcOutput(ctx *Context, args *LookupVpcOutputArgs, opts ...InvokeOption) LookupVpcResultOutput> Note: This function is named LookupVpc in the Go SDK.
public static class GetVpc 
{
    public static Task<GetVpcResult> InvokeAsync(GetVpcArgs args, InvokeOptions? opts = null)
    public static Output<GetVpcResult> Invoke(GetVpcInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetVpcResult> getVpc(GetVpcArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: scaleway:index/getVpc:getVpc
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Is
Default bool - To get default VPC's information.
 - Name string
 - Name of the VPC. One of 
nameandvpc_idshould be specified. - Organization
Id string - The ID of the organization the VPC is associated with.
 - Project
Id string project_id) The ID of the project the VPC is associated with.- Region string
 - Vpc
Id string - ID of the VPC. One of 
nameandvpc_idshould be specified. 
- Is
Default bool - To get default VPC's information.
 - Name string
 - Name of the VPC. One of 
nameandvpc_idshould be specified. - Organization
Id string - The ID of the organization the VPC is associated with.
 - Project
Id string project_id) The ID of the project the VPC is associated with.- Region string
 - Vpc
Id string - ID of the VPC. One of 
nameandvpc_idshould be specified. 
- is
Default Boolean - To get default VPC's information.
 - name String
 - Name of the VPC. One of 
nameandvpc_idshould be specified. - organization
Id String - The ID of the organization the VPC is associated with.
 - project
Id String project_id) The ID of the project the VPC is associated with.- region String
 - vpc
Id String - ID of the VPC. One of 
nameandvpc_idshould be specified. 
- is
Default boolean - To get default VPC's information.
 - name string
 - Name of the VPC. One of 
nameandvpc_idshould be specified. - organization
Id string - The ID of the organization the VPC is associated with.
 - project
Id string project_id) The ID of the project the VPC is associated with.- region string
 - vpc
Id string - ID of the VPC. One of 
nameandvpc_idshould be specified. 
- is_
default bool - To get default VPC's information.
 - name str
 - Name of the VPC. One of 
nameandvpc_idshould be specified. - organization_
id str - The ID of the organization the VPC is associated with.
 - project_
id str project_id) The ID of the project the VPC is associated with.- region str
 - vpc_
id str - ID of the VPC. One of 
nameandvpc_idshould be specified. 
- is
Default Boolean - To get default VPC's information.
 - name String
 - Name of the VPC. One of 
nameandvpc_idshould be specified. - organization
Id String - The ID of the organization the VPC is associated with.
 - project
Id String project_id) The ID of the project the VPC is associated with.- region String
 - vpc
Id String - ID of the VPC. One of 
nameandvpc_idshould be specified. 
getVpc Result
The following output properties are available:
- Created
At string - Enable
Routing bool - Id string
 - The provider-assigned unique ID for this managed resource.
 - Organization
Id string - List<string>
 - Updated
At string - Is
Default bool - Name string
 - Project
Id string - Region string
 - Vpc
Id string 
- Created
At string - Enable
Routing bool - Id string
 - The provider-assigned unique ID for this managed resource.
 - Organization
Id string - []string
 - Updated
At string - Is
Default bool - Name string
 - Project
Id string - Region string
 - Vpc
Id string 
- created
At String - enable
Routing Boolean - id String
 - The provider-assigned unique ID for this managed resource.
 - organization
Id String - List<String>
 - updated
At String - is
Default Boolean - name String
 - project
Id String - region String
 - vpc
Id String 
- created
At string - enable
Routing boolean - id string
 - The provider-assigned unique ID for this managed resource.
 - organization
Id string - string[]
 - updated
At string - is
Default boolean - name string
 - project
Id string - region string
 - vpc
Id string 
- created_
at str - enable_
routing bool - id str
 - The provider-assigned unique ID for this managed resource.
 - organization_
id str - Sequence[str]
 - updated_
at str - is_
default bool - name str
 - project_
id str - region str
 - vpc_
id str 
- created
At String - enable
Routing Boolean - id String
 - The provider-assigned unique ID for this managed resource.
 - organization
Id String - List<String>
 - updated
At String - is
Default Boolean - name String
 - project
Id String - region String
 - vpc
Id String 
Package Details
- Repository
 - scaleway pulumiverse/pulumi-scaleway
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
scalewayTerraform Provider.