1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. VirtualNetwork
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

oci.Core.VirtualNetwork

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi

    Create VirtualNetwork Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VirtualNetwork(name: string, args: VirtualNetworkArgs, opts?: CustomResourceOptions);
    @overload
    def VirtualNetwork(resource_name: str,
                       args: VirtualNetworkArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VirtualNetwork(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       compartment_id: Optional[str] = None,
                       byoipv6cidr_details: Optional[Sequence[_core.VirtualNetworkByoipv6cidrDetailArgs]] = None,
                       cidr_block: Optional[str] = None,
                       cidr_blocks: Optional[Sequence[str]] = None,
                       defined_tags: Optional[Mapping[str, Any]] = None,
                       display_name: Optional[str] = None,
                       dns_label: Optional[str] = None,
                       freeform_tags: Optional[Mapping[str, Any]] = None,
                       ipv6private_cidr_blocks: Optional[Sequence[str]] = None,
                       is_ipv6enabled: Optional[bool] = None,
                       is_oracle_gua_allocation_enabled: Optional[bool] = None)
    func NewVirtualNetwork(ctx *Context, name string, args VirtualNetworkArgs, opts ...ResourceOption) (*VirtualNetwork, error)
    public VirtualNetwork(string name, VirtualNetworkArgs args, CustomResourceOptions? opts = null)
    public VirtualNetwork(String name, VirtualNetworkArgs args)
    public VirtualNetwork(String name, VirtualNetworkArgs args, CustomResourceOptions options)
    
    type: oci:Core:VirtualNetwork
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args VirtualNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args VirtualNetworkArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args VirtualNetworkArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VirtualNetworkArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VirtualNetworkArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var virtualNetworkResource = new Oci.Core.VirtualNetwork("virtualNetworkResource", new()
    {
        CompartmentId = "string",
        Byoipv6cidrDetails = new[]
        {
            new Oci.Core.Inputs.VirtualNetworkByoipv6cidrDetailArgs
            {
                Byoipv6rangeId = "string",
                Ipv6cidrBlock = "string",
            },
        },
        CidrBlock = "string",
        CidrBlocks = new[]
        {
            "string",
        },
        DefinedTags = 
        {
            { "string", "any" },
        },
        DisplayName = "string",
        DnsLabel = "string",
        FreeformTags = 
        {
            { "string", "any" },
        },
        Ipv6privateCidrBlocks = new[]
        {
            "string",
        },
        IsIpv6enabled = false,
        IsOracleGuaAllocationEnabled = false,
    });
    
    example, err := Core.NewVirtualNetwork(ctx, "virtualNetworkResource", &Core.VirtualNetworkArgs{
    	CompartmentId: pulumi.String("string"),
    	Byoipv6cidrDetails: core.VirtualNetworkByoipv6cidrDetailArray{
    		&core.VirtualNetworkByoipv6cidrDetailArgs{
    			Byoipv6rangeId: pulumi.String("string"),
    			Ipv6cidrBlock:  pulumi.String("string"),
    		},
    	},
    	CidrBlock: pulumi.String("string"),
    	CidrBlocks: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	DefinedTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	DisplayName: pulumi.String("string"),
    	DnsLabel:    pulumi.String("string"),
    	FreeformTags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Ipv6privateCidrBlocks: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	IsIpv6enabled:                pulumi.Bool(false),
    	IsOracleGuaAllocationEnabled: pulumi.Bool(false),
    })
    
    var virtualNetworkResource = new VirtualNetwork("virtualNetworkResource", VirtualNetworkArgs.builder()        
        .compartmentId("string")
        .byoipv6cidrDetails(VirtualNetworkByoipv6cidrDetailArgs.builder()
            .byoipv6rangeId("string")
            .ipv6cidrBlock("string")
            .build())
        .cidrBlock("string")
        .cidrBlocks("string")
        .definedTags(Map.of("string", "any"))
        .displayName("string")
        .dnsLabel("string")
        .freeformTags(Map.of("string", "any"))
        .ipv6privateCidrBlocks("string")
        .isIpv6enabled(false)
        .isOracleGuaAllocationEnabled(false)
        .build());
    
    virtual_network_resource = oci.core.VirtualNetwork("virtualNetworkResource",
        compartment_id="string",
        byoipv6cidr_details=[oci.core.VirtualNetworkByoipv6cidrDetailArgs(
            byoipv6range_id="string",
            ipv6cidr_block="string",
        )],
        cidr_block="string",
        cidr_blocks=["string"],
        defined_tags={
            "string": "any",
        },
        display_name="string",
        dns_label="string",
        freeform_tags={
            "string": "any",
        },
        ipv6private_cidr_blocks=["string"],
        is_ipv6enabled=False,
        is_oracle_gua_allocation_enabled=False)
    
    const virtualNetworkResource = new oci.core.VirtualNetwork("virtualNetworkResource", {
        compartmentId: "string",
        byoipv6cidrDetails: [{
            byoipv6rangeId: "string",
            ipv6cidrBlock: "string",
        }],
        cidrBlock: "string",
        cidrBlocks: ["string"],
        definedTags: {
            string: "any",
        },
        displayName: "string",
        dnsLabel: "string",
        freeformTags: {
            string: "any",
        },
        ipv6privateCidrBlocks: ["string"],
        isIpv6enabled: false,
        isOracleGuaAllocationEnabled: false,
    });
    
    type: oci:Core:VirtualNetwork
    properties:
        byoipv6cidrDetails:
            - byoipv6rangeId: string
              ipv6cidrBlock: string
        cidrBlock: string
        cidrBlocks:
            - string
        compartmentId: string
        definedTags:
            string: any
        displayName: string
        dnsLabel: string
        freeformTags:
            string: any
        ipv6privateCidrBlocks:
            - string
        isIpv6enabled: false
        isOracleGuaAllocationEnabled: false
    

    VirtualNetwork Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The VirtualNetwork resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VirtualNetwork resource produces the following output properties:

    Byoipv6cidrBlocks List<string>
    DefaultDhcpOptionsId string
    DefaultRouteTableId string
    DefaultSecurityListId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6cidrBlocks List<string>
    State string
    TimeCreated string
    VcnDomainName string
    Byoipv6cidrBlocks []string
    DefaultDhcpOptionsId string
    DefaultRouteTableId string
    DefaultSecurityListId string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6cidrBlocks []string
    State string
    TimeCreated string
    VcnDomainName string
    byoipv6cidrBlocks List<String>
    defaultDhcpOptionsId String
    defaultRouteTableId String
    defaultSecurityListId String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6cidrBlocks List<String>
    state String
    timeCreated String
    vcnDomainName String
    byoipv6cidrBlocks string[]
    defaultDhcpOptionsId string
    defaultRouteTableId string
    defaultSecurityListId string
    id string
    The provider-assigned unique ID for this managed resource.
    ipv6cidrBlocks string[]
    state string
    timeCreated string
    vcnDomainName string
    byoipv6cidr_blocks Sequence[str]
    default_dhcp_options_id str
    default_route_table_id str
    default_security_list_id str
    id str
    The provider-assigned unique ID for this managed resource.
    ipv6cidr_blocks Sequence[str]
    state str
    time_created str
    vcn_domain_name str
    byoipv6cidrBlocks List<String>
    defaultDhcpOptionsId String
    defaultRouteTableId String
    defaultSecurityListId String
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6cidrBlocks List<String>
    state String
    timeCreated String
    vcnDomainName String

    Look up Existing VirtualNetwork Resource

    Get an existing VirtualNetwork resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: VirtualNetworkState, opts?: CustomResourceOptions): VirtualNetwork
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            byoipv6cidr_blocks: Optional[Sequence[str]] = None,
            byoipv6cidr_details: Optional[Sequence[_core.VirtualNetworkByoipv6cidrDetailArgs]] = None,
            cidr_block: Optional[str] = None,
            cidr_blocks: Optional[Sequence[str]] = None,
            compartment_id: Optional[str] = None,
            default_dhcp_options_id: Optional[str] = None,
            default_route_table_id: Optional[str] = None,
            default_security_list_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, Any]] = None,
            display_name: Optional[str] = None,
            dns_label: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, Any]] = None,
            ipv6cidr_blocks: Optional[Sequence[str]] = None,
            ipv6private_cidr_blocks: Optional[Sequence[str]] = None,
            is_ipv6enabled: Optional[bool] = None,
            is_oracle_gua_allocation_enabled: Optional[bool] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None,
            vcn_domain_name: Optional[str] = None) -> VirtualNetwork
    func GetVirtualNetwork(ctx *Context, name string, id IDInput, state *VirtualNetworkState, opts ...ResourceOption) (*VirtualNetwork, error)
    public static VirtualNetwork Get(string name, Input<string> id, VirtualNetworkState? state, CustomResourceOptions? opts = null)
    public static VirtualNetwork get(String name, Output<String> id, VirtualNetworkState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:

    Supporting Types

    VirtualNetworkByoipv6cidrDetail, VirtualNetworkByoipv6cidrDetailArgs

    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 v1.31.0 published on Wednesday, Apr 10, 2024 by Pulumi