1. Packages
  2. Event Store Cloud
  3. API Docs
  4. getNetwork
Event Store Cloud v0.2.10 published on Thursday, Aug 31, 2023 by EventStore

eventstorecloud.getNetwork

Explore with Pulumi AI

eventstorecloud logo
Event Store Cloud v0.2.10 published on Thursday, Aug 31, 2023 by EventStore

    Retrieves data for an existing Network resource

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using EventStoreCloud = Pulumi.EventStoreCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = EventStoreCloud.GetNetwork.Invoke(new()
        {
            Name = "Example Network",
            ProjectId = @var.Project_id,
        });
    
        return new Dictionary<string, object?>
        {
            ["networkCidr"] = example.Apply(getNetworkResult => getNetworkResult.CidrBlock),
        };
    });
    
    package main
    
    import (
    	"github.com/EventStore/pulumi-eventstorecloud/sdk/go/eventstorecloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := eventstorecloud.LookupNetwork(ctx, &eventstorecloud.LookupNetworkArgs{
    			Name:      "Example Network",
    			ProjectId: _var.Project_id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("networkCidr", example.CidrBlock)
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.eventstorecloud.EventstorecloudFunctions;
    import com.pulumi.eventstorecloud.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 example = EventstorecloudFunctions.getNetwork(GetNetworkArgs.builder()
                .name("Example Network")
                .projectId(var_.project_id())
                .build());
    
            ctx.export("networkCidr", example.applyValue(getNetworkResult -> getNetworkResult.cidrBlock()));
        }
    }
    
    import pulumi
    import pulumi_eventstorecloud as eventstorecloud
    
    example = eventstorecloud.get_network(name="Example Network",
        project_id=var["project_id"])
    pulumi.export("networkCidr", example.cidr_block)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as eventstorecloud from "@pulumi/eventstorecloud";
    
    const example = eventstorecloud.getNetwork({
        name: "Example Network",
        projectId: _var.project_id,
    });
    export const networkCidr = example.then(example => example.cidrBlock);
    
    variables:
      example:
        fn::invoke:
          Function: eventstorecloud:getNetwork
          Arguments:
            name: Example Network
            projectId: ${var.project_id}
    outputs:
      networkCidr: ${example.cidrBlock}
    

    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(name: Optional[str] = None,
                    project_id: Optional[str] = None,
                    opts: Optional[InvokeOptions] = None) -> GetNetworkResult
    def get_network_output(name: Optional[pulumi.Input[str]] = None,
                    project_id: 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: eventstorecloud:index/getNetwork:getNetwork
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    ProjectId string
    Name string
    ProjectId string
    name String
    projectId String
    name string
    projectId string
    name String
    projectId String

    getNetwork Result

    The following output properties are available:

    CidrBlock string
    Address space of the network in CIDR block notation
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ProjectId string
    Region string
    Provider region in which to provision the network
    ResourceProvider string
    Cloud Provider in which to provision the network.
    CidrBlock string
    Address space of the network in CIDR block notation
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    ProjectId string
    Region string
    Provider region in which to provision the network
    ResourceProvider string
    Cloud Provider in which to provision the network.
    cidrBlock String
    Address space of the network in CIDR block notation
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    projectId String
    region String
    Provider region in which to provision the network
    resourceProvider String
    Cloud Provider in which to provision the network.
    cidrBlock string
    Address space of the network in CIDR block notation
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    projectId string
    region string
    Provider region in which to provision the network
    resourceProvider string
    Cloud Provider in which to provision the network.
    cidr_block str
    Address space of the network in CIDR block notation
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    project_id str
    region str
    Provider region in which to provision the network
    resource_provider str
    Cloud Provider in which to provision the network.
    cidrBlock String
    Address space of the network in CIDR block notation
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    projectId String
    region String
    Provider region in which to provision the network
    resourceProvider String
    Cloud Provider in which to provision the network.

    Package Details

    Repository
    eventstorecloud EventStore/pulumi-eventstorecloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the eventstorecloud Terraform Provider.
    eventstorecloud logo
    Event Store Cloud v0.2.10 published on Thursday, Aug 31, 2023 by EventStore