1. Packages
  2. Scaleway
  3. API Docs
  4. getVpcs
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

scaleway.getVpcs

Explore with Pulumi AI

scaleway logo
Scaleway v1.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse

    Gets information about multiple Virtual Private Clouds.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as scaleway from "@pulumi/scaleway";
    
    const myKey = scaleway.getVpcs({
        name: "tf-vpc-datasource",
        region: "nl-ams",
    });
    
    import pulumi
    import pulumi_scaleway as scaleway
    
    my_key = scaleway.get_vpcs(name="tf-vpc-datasource",
        region="nl-ams")
    
    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.GetVpcs(ctx, &scaleway.GetVpcsArgs{
    			Name:   pulumi.StringRef("tf-vpc-datasource"),
    			Region: pulumi.StringRef("nl-ams"),
    		}, 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 myKey = Scaleway.GetVpcs.Invoke(new()
        {
            Name = "tf-vpc-datasource",
            Region = "nl-ams",
        });
    
    });
    
    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.GetVpcsArgs;
    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 myKey = ScalewayFunctions.getVpcs(GetVpcsArgs.builder()
                .name("tf-vpc-datasource")
                .region("nl-ams")
                .build());
    
        }
    }
    
    variables:
      myKey:
        fn::invoke:
          Function: scaleway:getVpcs
          Arguments:
            name: tf-vpc-datasource
            region: nl-ams
    

    Using getVpcs

    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 getVpcs(args: GetVpcsArgs, opts?: InvokeOptions): Promise<GetVpcsResult>
    function getVpcsOutput(args: GetVpcsOutputArgs, opts?: InvokeOptions): Output<GetVpcsResult>
    def get_vpcs(name: Optional[str] = None,
                 project_id: Optional[str] = None,
                 region: Optional[str] = None,
                 tags: Optional[Sequence[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> GetVpcsResult
    def get_vpcs_output(name: Optional[pulumi.Input[str]] = None,
                 project_id: Optional[pulumi.Input[str]] = None,
                 region: Optional[pulumi.Input[str]] = None,
                 tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetVpcsResult]
    func GetVpcs(ctx *Context, args *GetVpcsArgs, opts ...InvokeOption) (*GetVpcsResult, error)
    func GetVpcsOutput(ctx *Context, args *GetVpcsOutputArgs, opts ...InvokeOption) GetVpcsResultOutput

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

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

    The following arguments are supported:

    Name string
    The VPC name to filter for. VPCs with a similar name are listed.
    ProjectId string
    The ID of the Project the VPC is associated with.
    Region string
    region). The region in which the VPCs exist.
    Tags List<string>
    List of tags to filter for. VPCs with these exact tags are listed.
    Name string
    The VPC name to filter for. VPCs with a similar name are listed.
    ProjectId string
    The ID of the Project the VPC is associated with.
    Region string
    region). The region in which the VPCs exist.
    Tags []string
    List of tags to filter for. VPCs with these exact tags are listed.
    name String
    The VPC name to filter for. VPCs with a similar name are listed.
    projectId String
    The ID of the Project the VPC is associated with.
    region String
    region). The region in which the VPCs exist.
    tags List<String>
    List of tags to filter for. VPCs with these exact tags are listed.
    name string
    The VPC name to filter for. VPCs with a similar name are listed.
    projectId string
    The ID of the Project the VPC is associated with.
    region string
    region). The region in which the VPCs exist.
    tags string[]
    List of tags to filter for. VPCs with these exact tags are listed.
    name str
    The VPC name to filter for. VPCs with a similar name are listed.
    project_id str
    The ID of the Project the VPC is associated with.
    region str
    region). The region in which the VPCs exist.
    tags Sequence[str]
    List of tags to filter for. VPCs with these exact tags are listed.
    name String
    The VPC name to filter for. VPCs with a similar name are listed.
    projectId String
    The ID of the Project the VPC is associated with.
    region String
    region). The region in which the VPCs exist.
    tags List<String>
    List of tags to filter for. VPCs with these exact tags are listed.

    getVpcs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The Organization ID the VPC is associated with.
    ProjectId string
    The ID of the Project the VPC is associated with.
    Region string
    Vpcs List<Pulumiverse.Scaleway.Outputs.GetVpcsVpc>
    List of retrieved VPCs
    Name string
    Tags List<string>
    Id string
    The provider-assigned unique ID for this managed resource.
    OrganizationId string
    The Organization ID the VPC is associated with.
    ProjectId string
    The ID of the Project the VPC is associated with.
    Region string
    Vpcs []GetVpcsVpc
    List of retrieved VPCs
    Name string
    Tags []string
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The Organization ID the VPC is associated with.
    projectId String
    The ID of the Project the VPC is associated with.
    region String
    vpcs List<GetVpcsVpc>
    List of retrieved VPCs
    name String
    tags List<String>
    id string
    The provider-assigned unique ID for this managed resource.
    organizationId string
    The Organization ID the VPC is associated with.
    projectId string
    The ID of the Project the VPC is associated with.
    region string
    vpcs GetVpcsVpc[]
    List of retrieved VPCs
    name string
    tags string[]
    id str
    The provider-assigned unique ID for this managed resource.
    organization_id str
    The Organization ID the VPC is associated with.
    project_id str
    The ID of the Project the VPC is associated with.
    region str
    vpcs Sequence[GetVpcsVpc]
    List of retrieved VPCs
    name str
    tags Sequence[str]
    id String
    The provider-assigned unique ID for this managed resource.
    organizationId String
    The Organization ID the VPC is associated with.
    projectId String
    The ID of the Project the VPC is associated with.
    region String
    vpcs List<Property Map>
    List of retrieved VPCs
    name String
    tags List<String>

    Supporting Types

    GetVpcsVpc

    CreatedAt string
    Date and time of VPC's creation (RFC 3339 format).
    Id string

    The associated VPC ID.

    Important: VPC IDs are regional, which means they are of the form {region}/{id}, e.g. `fr-par/11111111-1111-1111-1111-111111111111

    IsDefault bool
    Defines whether the VPC is the default one for its Project.
    Name string
    The VPC name to filter for. VPCs with a similar name are listed.
    OrganizationId string
    The Organization ID the VPC is associated with.
    ProjectId string
    The ID of the Project the VPC is associated with.
    Region string
    region). The region in which the VPCs exist.
    Tags List<string>
    List of tags to filter for. VPCs with these exact tags are listed.
    UpdateAt string
    CreatedAt string
    Date and time of VPC's creation (RFC 3339 format).
    Id string

    The associated VPC ID.

    Important: VPC IDs are regional, which means they are of the form {region}/{id}, e.g. `fr-par/11111111-1111-1111-1111-111111111111

    IsDefault bool
    Defines whether the VPC is the default one for its Project.
    Name string
    The VPC name to filter for. VPCs with a similar name are listed.
    OrganizationId string
    The Organization ID the VPC is associated with.
    ProjectId string
    The ID of the Project the VPC is associated with.
    Region string
    region). The region in which the VPCs exist.
    Tags []string
    List of tags to filter for. VPCs with these exact tags are listed.
    UpdateAt string
    createdAt String
    Date and time of VPC's creation (RFC 3339 format).
    id String

    The associated VPC ID.

    Important: VPC IDs are regional, which means they are of the form {region}/{id}, e.g. `fr-par/11111111-1111-1111-1111-111111111111

    isDefault Boolean
    Defines whether the VPC is the default one for its Project.
    name String
    The VPC name to filter for. VPCs with a similar name are listed.
    organizationId String
    The Organization ID the VPC is associated with.
    projectId String
    The ID of the Project the VPC is associated with.
    region String
    region). The region in which the VPCs exist.
    tags List<String>
    List of tags to filter for. VPCs with these exact tags are listed.
    updateAt String
    createdAt string
    Date and time of VPC's creation (RFC 3339 format).
    id string

    The associated VPC ID.

    Important: VPC IDs are regional, which means they are of the form {region}/{id}, e.g. `fr-par/11111111-1111-1111-1111-111111111111

    isDefault boolean
    Defines whether the VPC is the default one for its Project.
    name string
    The VPC name to filter for. VPCs with a similar name are listed.
    organizationId string
    The Organization ID the VPC is associated with.
    projectId string
    The ID of the Project the VPC is associated with.
    region string
    region). The region in which the VPCs exist.
    tags string[]
    List of tags to filter for. VPCs with these exact tags are listed.
    updateAt string
    created_at str
    Date and time of VPC's creation (RFC 3339 format).
    id str

    The associated VPC ID.

    Important: VPC IDs are regional, which means they are of the form {region}/{id}, e.g. `fr-par/11111111-1111-1111-1111-111111111111

    is_default bool
    Defines whether the VPC is the default one for its Project.
    name str
    The VPC name to filter for. VPCs with a similar name are listed.
    organization_id str
    The Organization ID the VPC is associated with.
    project_id str
    The ID of the Project the VPC is associated with.
    region str
    region). The region in which the VPCs exist.
    tags Sequence[str]
    List of tags to filter for. VPCs with these exact tags are listed.
    update_at str
    createdAt String
    Date and time of VPC's creation (RFC 3339 format).
    id String

    The associated VPC ID.

    Important: VPC IDs are regional, which means they are of the form {region}/{id}, e.g. `fr-par/11111111-1111-1111-1111-111111111111

    isDefault Boolean
    Defines whether the VPC is the default one for its Project.
    name String
    The VPC name to filter for. VPCs with a similar name are listed.
    organizationId String
    The Organization ID the VPC is associated with.
    projectId String
    The ID of the Project the VPC is associated with.
    region String
    region). The region in which the VPCs exist.
    tags List<String>
    List of tags to filter for. VPCs with these exact tags are listed.
    updateAt 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.15.0 published on Tuesday, Jul 30, 2024 by pulumiverse