1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getVcn
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Core.getVcn

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about a specific Vcn resource in Oracle Cloud Infrastructure Core service.

    Gets the specified VCN’s information.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVcn = oci.Core.getVcn({
        vcnId: testVcnOciCoreVcn.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_vcn = oci.Core.get_vcn(vcn_id=test_vcn_oci_core_vcn["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.GetVcn(ctx, &core.GetVcnArgs{
    			VcnId: testVcnOciCoreVcn.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testVcn = Oci.Core.GetVcn.Invoke(new()
        {
            VcnId = testVcnOciCoreVcn.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.CoreFunctions;
    import com.pulumi.oci.Core.inputs.GetVcnArgs;
    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 testVcn = CoreFunctions.getVcn(GetVcnArgs.builder()
                .vcnId(testVcnOciCoreVcn.id())
                .build());
    
        }
    }
    
    variables:
      testVcn:
        fn::invoke:
          Function: oci:Core:getVcn
          Arguments:
            vcnId: ${testVcnOciCoreVcn.id}
    

    Using getVcn

    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 getVcn(args: GetVcnArgs, opts?: InvokeOptions): Promise<GetVcnResult>
    function getVcnOutput(args: GetVcnOutputArgs, opts?: InvokeOptions): Output<GetVcnResult>
    def get_vcn(vcn_id: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetVcnResult
    def get_vcn_output(vcn_id: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetVcnResult]
    func GetVcn(ctx *Context, args *GetVcnArgs, opts ...InvokeOption) (*GetVcnResult, error)
    func GetVcnOutput(ctx *Context, args *GetVcnOutputArgs, opts ...InvokeOption) GetVcnResultOutput

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

    public static class GetVcn 
    {
        public static Task<GetVcnResult> InvokeAsync(GetVcnArgs args, InvokeOptions? opts = null)
        public static Output<GetVcnResult> Invoke(GetVcnInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVcnResult> getVcn(GetVcnArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getVcn:getVcn
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VcnId string
    Specify the OCID of the VCN.
    VcnId string
    Specify the OCID of the VCN.
    vcnId String
    Specify the OCID of the VCN.
    vcnId string
    Specify the OCID of the VCN.
    vcn_id str
    Specify the OCID of the VCN.
    vcnId String
    Specify the OCID of the VCN.

    getVcn Result

    The following output properties are available:

    Byoipv6cidrBlocks List<string>
    The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges.
    Byoipv6cidrDetails List<GetVcnByoipv6cidrDetail>
    CidrBlock string
    Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16
    CidrBlocks List<string>
    The list of IPv4 CIDR blocks the VCN will use.
    CompartmentId string
    The OCID of the compartment containing the VCN.
    DefaultDhcpOptionsId string
    The OCID for the VCN's default set of DHCP options.
    DefaultRouteTableId string
    The OCID for the VCN's default route table.
    DefaultSecurityListId string
    The OCID for the VCN's default security list.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    DnsLabel string
    A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com). Must be an alphanumeric string that begins with a letter. The value cannot be changed.
    FreeformTags Dictionary<string, string>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The VCN's Oracle ID (OCID).
    Ipv6cidrBlocks List<string>
    For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56.
    Ipv6privateCidrBlocks List<string>
    For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space.
    IsIpv6enabled bool
    IsOracleGuaAllocationEnabled bool
    SecurityAttributes Dictionary<string, string>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    State string
    The VCN's current state.
    TimeCreated string
    The date and time the VCN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnDomainName string
    The VCN's domain name, which consists of the VCN's DNS label, and the oraclevcn.com domain.
    VcnId string
    Byoipv6cidrBlocks []string
    The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges.
    Byoipv6cidrDetails []GetVcnByoipv6cidrDetail
    CidrBlock string
    Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16
    CidrBlocks []string
    The list of IPv4 CIDR blocks the VCN will use.
    CompartmentId string
    The OCID of the compartment containing the VCN.
    DefaultDhcpOptionsId string
    The OCID for the VCN's default set of DHCP options.
    DefaultRouteTableId string
    The OCID for the VCN's default route table.
    DefaultSecurityListId string
    The OCID for the VCN's default security list.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    DnsLabel string
    A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com). Must be an alphanumeric string that begins with a letter. The value cannot be changed.
    FreeformTags map[string]string
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Id string
    The VCN's Oracle ID (OCID).
    Ipv6cidrBlocks []string
    For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56.
    Ipv6privateCidrBlocks []string
    For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space.
    IsIpv6enabled bool
    IsOracleGuaAllocationEnabled bool
    SecurityAttributes map[string]string
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    State string
    The VCN's current state.
    TimeCreated string
    The date and time the VCN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VcnDomainName string
    The VCN's domain name, which consists of the VCN's DNS label, and the oraclevcn.com domain.
    VcnId string
    byoipv6cidrBlocks List<String>
    The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges.
    byoipv6cidrDetails List<GetVcnByoipv6cidrDetail>
    cidrBlock String
    Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16
    cidrBlocks List<String>
    The list of IPv4 CIDR blocks the VCN will use.
    compartmentId String
    The OCID of the compartment containing the VCN.
    defaultDhcpOptionsId String
    The OCID for the VCN's default set of DHCP options.
    defaultRouteTableId String
    The OCID for the VCN's default route table.
    defaultSecurityListId String
    The OCID for the VCN's default security list.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    dnsLabel String
    A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com). Must be an alphanumeric string that begins with a letter. The value cannot be changed.
    freeformTags Map<String,String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The VCN's Oracle ID (OCID).
    ipv6cidrBlocks List<String>
    For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56.
    ipv6privateCidrBlocks List<String>
    For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space.
    isIpv6enabled Boolean
    isOracleGuaAllocationEnabled Boolean
    securityAttributes Map<String,String>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    state String
    The VCN's current state.
    timeCreated String
    The date and time the VCN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnDomainName String
    The VCN's domain name, which consists of the VCN's DNS label, and the oraclevcn.com domain.
    vcnId String
    byoipv6cidrBlocks string[]
    The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges.
    byoipv6cidrDetails GetVcnByoipv6cidrDetail[]
    cidrBlock string
    Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16
    cidrBlocks string[]
    The list of IPv4 CIDR blocks the VCN will use.
    compartmentId string
    The OCID of the compartment containing the VCN.
    defaultDhcpOptionsId string
    The OCID for the VCN's default set of DHCP options.
    defaultRouteTableId string
    The OCID for the VCN's default route table.
    defaultSecurityListId string
    The OCID for the VCN's default security list.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    dnsLabel string
    A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com). Must be an alphanumeric string that begins with a letter. The value cannot be changed.
    freeformTags {[key: string]: string}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id string
    The VCN's Oracle ID (OCID).
    ipv6cidrBlocks string[]
    For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56.
    ipv6privateCidrBlocks string[]
    For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space.
    isIpv6enabled boolean
    isOracleGuaAllocationEnabled boolean
    securityAttributes {[key: string]: string}
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    state string
    The VCN's current state.
    timeCreated string
    The date and time the VCN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnDomainName string
    The VCN's domain name, which consists of the VCN's DNS label, and the oraclevcn.com domain.
    vcnId string
    byoipv6cidr_blocks Sequence[str]
    The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges.
    byoipv6cidr_details Sequence[core.GetVcnByoipv6cidrDetail]
    cidr_block str
    Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16
    cidr_blocks Sequence[str]
    The list of IPv4 CIDR blocks the VCN will use.
    compartment_id str
    The OCID of the compartment containing the VCN.
    default_dhcp_options_id str
    The OCID for the VCN's default set of DHCP options.
    default_route_table_id str
    The OCID for the VCN's default route table.
    default_security_list_id str
    The OCID for the VCN's default security list.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    dns_label str
    A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com). Must be an alphanumeric string that begins with a letter. The value cannot be changed.
    freeform_tags Mapping[str, str]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id str
    The VCN's Oracle ID (OCID).
    ipv6cidr_blocks Sequence[str]
    For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56.
    ipv6private_cidr_blocks Sequence[str]
    For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space.
    is_ipv6enabled bool
    is_oracle_gua_allocation_enabled bool
    security_attributes Mapping[str, str]
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    state str
    The VCN's current state.
    time_created str
    The date and time the VCN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcn_domain_name str
    The VCN's domain name, which consists of the VCN's DNS label, and the oraclevcn.com domain.
    vcn_id str
    byoipv6cidrBlocks List<String>
    The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges.
    byoipv6cidrDetails List<Property Map>
    cidrBlock String
    Deprecated. The first CIDR IP address from cidrBlocks. Example: 172.16.0.0/16
    cidrBlocks List<String>
    The list of IPv4 CIDR blocks the VCN will use.
    compartmentId String
    The OCID of the compartment containing the VCN.
    defaultDhcpOptionsId String
    The OCID for the VCN's default set of DHCP options.
    defaultRouteTableId String
    The OCID for the VCN's default route table.
    defaultSecurityListId String
    The OCID for the VCN's default security list.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    dnsLabel String
    A DNS label for the VCN, used in conjunction with the VNIC's hostname and subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example, bminstance1.subnet123.vcn1.oraclevcn.com). Must be an alphanumeric string that begins with a letter. The value cannot be changed.
    freeformTags Map<String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    id String
    The VCN's Oracle ID (OCID).
    ipv6cidrBlocks List<String>
    For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN's IP address space. The prefixes are provided by Oracle and the sizes are always /56.
    ipv6privateCidrBlocks List<String>
    For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN's IP address space.
    isIpv6enabled Boolean
    isOracleGuaAllocationEnabled Boolean
    securityAttributes Map<String>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    state String
    The VCN's current state.
    timeCreated String
    The date and time the VCN was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vcnDomainName String
    The VCN's domain name, which consists of the VCN's DNS label, and the oraclevcn.com domain.
    vcnId String

    Supporting Types

    GetVcnByoipv6cidrDetail

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi