1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. oracledatabase
  5. getOdbNetwork
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.16.0
published on Thursday, Mar 19, 2026 by Pulumi

    Get information about an ODB Network.

    For more information see the API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const my_network = gcp.oracledatabase.getOdbNetwork({
        location: "us-east4",
        odbNetworkId: "my-network-id",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_network = gcp.oracledatabase.get_odb_network(location="us-east4",
        odb_network_id="my-network-id")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/oracledatabase"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := oracledatabase.LookupOdbNetwork(ctx, &oracledatabase.LookupOdbNetworkArgs{
    			Location:     "us-east4",
    			OdbNetworkId: "my-network-id",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var my_network = Gcp.OracleDatabase.GetOdbNetwork.Invoke(new()
        {
            Location = "us-east4",
            OdbNetworkId = "my-network-id",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.oracledatabase.OracledatabaseFunctions;
    import com.pulumi.gcp.oracledatabase.inputs.GetOdbNetworkArgs;
    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 my-network = OracledatabaseFunctions.getOdbNetwork(GetOdbNetworkArgs.builder()
                .location("us-east4")
                .odbNetworkId("my-network-id")
                .build());
    
        }
    }
    
    variables:
      my-network:
        fn::invoke:
          function: gcp:oracledatabase:getOdbNetwork
          arguments:
            location: us-east4
            odbNetworkId: my-network-id
    

    Attributes reference

    See gcp.oracledatabase.OdbNetwork resource for details of the available attributes.

    Using getOdbNetwork

    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 getOdbNetwork(args: GetOdbNetworkArgs, opts?: InvokeOptions): Promise<GetOdbNetworkResult>
    function getOdbNetworkOutput(args: GetOdbNetworkOutputArgs, opts?: InvokeOptions): Output<GetOdbNetworkResult>
    def get_odb_network(location: Optional[str] = None,
                        odb_network_id: Optional[str] = None,
                        project: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetOdbNetworkResult
    def get_odb_network_output(location: Optional[pulumi.Input[str]] = None,
                        odb_network_id: Optional[pulumi.Input[str]] = None,
                        project: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetOdbNetworkResult]
    func LookupOdbNetwork(ctx *Context, args *LookupOdbNetworkArgs, opts ...InvokeOption) (*LookupOdbNetworkResult, error)
    func LookupOdbNetworkOutput(ctx *Context, args *LookupOdbNetworkOutputArgs, opts ...InvokeOption) LookupOdbNetworkResultOutput

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

    public static class GetOdbNetwork 
    {
        public static Task<GetOdbNetworkResult> InvokeAsync(GetOdbNetworkArgs args, InvokeOptions? opts = null)
        public static Output<GetOdbNetworkResult> Invoke(GetOdbNetworkInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetOdbNetworkResult> getOdbNetwork(GetOdbNetworkArgs args, InvokeOptions options)
    public static Output<GetOdbNetworkResult> getOdbNetwork(GetOdbNetworkArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:oracledatabase/getOdbNetwork:getOdbNetwork
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Location string
    The location of the resource.
    OdbNetworkId string
    The ID of the ODB Network.
    Project string
    The project to which the resource belongs. If it is not provided, the provider project is used.
    Location string
    The location of the resource.
    OdbNetworkId string
    The ID of the ODB Network.
    Project string
    The project to which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location of the resource.
    odbNetworkId String
    The ID of the ODB Network.
    project String
    The project to which the resource belongs. If it is not provided, the provider project is used.
    location string
    The location of the resource.
    odbNetworkId string
    The ID of the ODB Network.
    project string
    The project to which the resource belongs. If it is not provided, the provider project is used.
    location str
    The location of the resource.
    odb_network_id str
    The ID of the ODB Network.
    project str
    The project to which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location of the resource.
    odbNetworkId String
    The ID of the ODB Network.
    project String
    The project to which the resource belongs. If it is not provided, the provider project is used.

    getOdbNetwork Result

    The following output properties are available:

    CreateTime string
    DeletionProtection bool
    EffectiveLabels Dictionary<string, string>
    EntitlementId string
    GcpOracleZone string
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels Dictionary<string, string>
    Location string
    Name string
    Network string
    OdbNetworkId string
    PulumiLabels Dictionary<string, string>
    State string
    Project string
    CreateTime string
    DeletionProtection bool
    EffectiveLabels map[string]string
    EntitlementId string
    GcpOracleZone string
    Id string
    The provider-assigned unique ID for this managed resource.
    Labels map[string]string
    Location string
    Name string
    Network string
    OdbNetworkId string
    PulumiLabels map[string]string
    State string
    Project string
    createTime String
    deletionProtection Boolean
    effectiveLabels Map<String,String>
    entitlementId String
    gcpOracleZone String
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String,String>
    location String
    name String
    network String
    odbNetworkId String
    pulumiLabels Map<String,String>
    state String
    project String
    createTime string
    deletionProtection boolean
    effectiveLabels {[key: string]: string}
    entitlementId string
    gcpOracleZone string
    id string
    The provider-assigned unique ID for this managed resource.
    labels {[key: string]: string}
    location string
    name string
    network string
    odbNetworkId string
    pulumiLabels {[key: string]: string}
    state string
    project string
    create_time str
    deletion_protection bool
    effective_labels Mapping[str, str]
    entitlement_id str
    gcp_oracle_zone str
    id str
    The provider-assigned unique ID for this managed resource.
    labels Mapping[str, str]
    location str
    name str
    network str
    odb_network_id str
    pulumi_labels Mapping[str, str]
    state str
    project str
    createTime String
    deletionProtection Boolean
    effectiveLabels Map<String>
    entitlementId String
    gcpOracleZone String
    id String
    The provider-assigned unique ID for this managed resource.
    labels Map<String>
    location String
    name String
    network String
    odbNetworkId String
    pulumiLabels Map<String>
    state String
    project String

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Viewing docs for Google Cloud v9.16.0
    published on Thursday, Mar 19, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.