1. Packages
  2. Civo
  3. API Docs
  4. getNetwork
Civo v2.4.1 published on Thursday, Aug 22, 2024 by Pulumi

civo.getNetwork

Explore with Pulumi AI

civo logo
Civo v2.4.1 published on Thursday, Aug 22, 2024 by Pulumi

    Retrieve information about a network for use in other resources.

    This data source provides all of the network’s properties as configured on your Civo account.

    Networks may be looked up by id or label, and you can optionally pass region if you want to make a lookup for a specific network inside that region.

    Example Usage

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.civo.CivoFunctions;
    import com.pulumi.civo.inputs.GetNetworkArgs;
    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 test = CivoFunctions.getNetwork(GetNetworkArgs.builder()
                .label("test-network")
                .region("LON1")
                .cidrV4("10.0.0.0/24")
                .nameserversV4(            
                    "8.8.8.8",
                    "8.8.4.4",
                    "1.1.1.1")
                .build());
    
        }
    }
    
    variables:
      test:
        fn::invoke:
          Function: civo:getNetwork
          Arguments:
            label: test-network
            region: LON1
            cidrV4: 10.0.0.0/24
            nameserversV4:
              - 8.8.8.8
              - 8.8.4.4
              - 1.1.1.1
    

    Using getNetwork

    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 getNetwork(args: GetNetworkArgs, opts?: InvokeOptions): Promise<GetNetworkResult>
    function getNetworkOutput(args: GetNetworkOutputArgs, opts?: InvokeOptions): Output<GetNetworkResult>
    def get_network(id: Optional[str] = None,
                    label: Optional[str] = None,
                    region: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetNetworkResult
    def get_network_output(id: Optional[pulumi.Input[str]] = None,
                    label: Optional[pulumi.Input[str]] = None,
                    region: Optional[pulumi.Input[str]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetNetworkResult]
    func LookupNetwork(ctx *Context, args *LookupNetworkArgs, opts ...InvokeOption) (*LookupNetworkResult, error)
    func LookupNetworkOutput(ctx *Context, args *LookupNetworkOutputArgs, opts ...InvokeOption) LookupNetworkResultOutput

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

    public static class GetNetwork 
    {
        public static Task<GetNetworkResult> InvokeAsync(GetNetworkArgs args, InvokeOptions? opts = null)
        public static Output<GetNetworkResult> Invoke(GetNetworkInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkResult> getNetwork(GetNetworkArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: civo:index/getNetwork:getNetwork
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The ID of this resource.
    Label string
    The label of an existing network
    Region string
    The region of an existing network
    Id string
    The ID of this resource.
    Label string
    The label of an existing network
    Region string
    The region of an existing network
    id String
    The ID of this resource.
    label String
    The label of an existing network
    region String
    The region of an existing network
    id string
    The ID of this resource.
    label string
    The label of an existing network
    region string
    The region of an existing network
    id str
    The ID of this resource.
    label str
    The label of an existing network
    region str
    The region of an existing network
    id String
    The ID of this resource.
    label String
    The label of an existing network
    region String
    The region of an existing network

    getNetwork Result

    The following output properties are available:

    Default bool
    If is the default network
    Name string
    The name of the network
    Id string
    The ID of this resource.
    Label string
    The label of an existing network
    Region string
    The region of an existing network
    Default bool
    If is the default network
    Name string
    The name of the network
    Id string
    The ID of this resource.
    Label string
    The label of an existing network
    Region string
    The region of an existing network
    default_ Boolean
    If is the default network
    name String
    The name of the network
    id String
    The ID of this resource.
    label String
    The label of an existing network
    region String
    The region of an existing network
    default boolean
    If is the default network
    name string
    The name of the network
    id string
    The ID of this resource.
    label string
    The label of an existing network
    region string
    The region of an existing network
    default bool
    If is the default network
    name str
    The name of the network
    id str
    The ID of this resource.
    label str
    The label of an existing network
    region str
    The region of an existing network
    default Boolean
    If is the default network
    name String
    The name of the network
    id String
    The ID of this resource.
    label String
    The label of an existing network
    region String
    The region of an existing network

    Package Details

    Repository
    Civo pulumi/pulumi-civo
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the civo Terraform Provider.
    civo logo
    Civo v2.4.1 published on Thursday, Aug 22, 2024 by Pulumi