oci.Core.VirtualNetwork
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[VirtualNetworkByoipv6cidrDetailArgs]] = None,
                   cidr_block: Optional[str] = None,
                   cidr_blocks: Optional[Sequence[str]] = None,
                   defined_tags: Optional[Mapping[str, str]] = None,
                   display_name: Optional[str] = None,
                   dns_label: Optional[str] = None,
                   freeform_tags: Optional[Mapping[str, str]] = None,
                   ipv6private_cidr_blocks: Optional[Sequence[str]] = None,
                   is_ipv6enabled: Optional[bool] = None,
                   is_oracle_gua_allocation_enabled: Optional[bool] = None,
                   security_attributes: Optional[Mapping[str, str]] = 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.
Constructor 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", "string" },
    },
    DisplayName = "string",
    DnsLabel = "string",
    FreeformTags = 
    {
        { "string", "string" },
    },
    Ipv6privateCidrBlocks = new[]
    {
        "string",
    },
    IsIpv6enabled = false,
    IsOracleGuaAllocationEnabled = false,
    SecurityAttributes = 
    {
        { "string", "string" },
    },
});
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.StringMap{
		"string": pulumi.String("string"),
	},
	DisplayName: pulumi.String("string"),
	DnsLabel:    pulumi.String("string"),
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Ipv6privateCidrBlocks: pulumi.StringArray{
		pulumi.String("string"),
	},
	IsIpv6enabled:                pulumi.Bool(false),
	IsOracleGuaAllocationEnabled: pulumi.Bool(false),
	SecurityAttributes: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
})
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", "string"))
    .displayName("string")
    .dnsLabel("string")
    .freeformTags(Map.of("string", "string"))
    .ipv6privateCidrBlocks("string")
    .isIpv6enabled(false)
    .isOracleGuaAllocationEnabled(false)
    .securityAttributes(Map.of("string", "string"))
    .build());
virtual_network_resource = oci.core.VirtualNetwork("virtualNetworkResource",
    compartment_id="string",
    byoipv6cidr_details=[{
        "byoipv6range_id": "string",
        "ipv6cidr_block": "string",
    }],
    cidr_block="string",
    cidr_blocks=["string"],
    defined_tags={
        "string": "string",
    },
    display_name="string",
    dns_label="string",
    freeform_tags={
        "string": "string",
    },
    ipv6private_cidr_blocks=["string"],
    is_ipv6enabled=False,
    is_oracle_gua_allocation_enabled=False,
    security_attributes={
        "string": "string",
    })
const virtualNetworkResource = new oci.core.VirtualNetwork("virtualNetworkResource", {
    compartmentId: "string",
    byoipv6cidrDetails: [{
        byoipv6rangeId: "string",
        ipv6cidrBlock: "string",
    }],
    cidrBlock: "string",
    cidrBlocks: ["string"],
    definedTags: {
        string: "string",
    },
    displayName: "string",
    dnsLabel: "string",
    freeformTags: {
        string: "string",
    },
    ipv6privateCidrBlocks: ["string"],
    isIpv6enabled: false,
    isOracleGuaAllocationEnabled: false,
    securityAttributes: {
        string: "string",
    },
});
type: oci:Core:VirtualNetwork
properties:
    byoipv6cidrDetails:
        - byoipv6rangeId: string
          ipv6cidrBlock: string
    cidrBlock: string
    cidrBlocks:
        - string
    compartmentId: string
    definedTags:
        string: string
    displayName: string
    dnsLabel: string
    freeformTags:
        string: string
    ipv6privateCidrBlocks:
        - string
    isIpv6enabled: false
    isOracleGuaAllocationEnabled: false
    securityAttributes:
        string: string
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The VirtualNetwork resource accepts the following input properties:
- CompartmentId string
- Byoipv6cidrDetails List<VirtualNetwork Byoipv6cidr Detail> 
- CidrBlock string
- CidrBlocks List<string>
- Dictionary<string, string>
- DisplayName string
- DnsLabel string
- Dictionary<string, string>
- Ipv6privateCidr List<string>Blocks 
- IsIpv6enabled bool
- IsOracle boolGua Allocation Enabled 
- SecurityAttributes Dictionary<string, string>
- CompartmentId string
- Byoipv6cidrDetails []VirtualNetwork Byoipv6cidr Detail Args 
- CidrBlock string
- CidrBlocks []string
- map[string]string
- DisplayName string
- DnsLabel string
- map[string]string
- Ipv6privateCidr []stringBlocks 
- IsIpv6enabled bool
- IsOracle boolGua Allocation Enabled 
- SecurityAttributes map[string]string
- compartmentId String
- byoipv6cidrDetails List<VirtualNetwork Byoipv6cidr Detail> 
- cidrBlock String
- cidrBlocks List<String>
- Map<String,String>
- displayName String
- dnsLabel String
- Map<String,String>
- ipv6privateCidr List<String>Blocks 
- isIpv6enabled Boolean
- isOracle BooleanGua Allocation Enabled 
- securityAttributes Map<String,String>
- compartmentId string
- byoipv6cidrDetails VirtualNetwork Byoipv6cidr Detail[] 
- cidrBlock string
- cidrBlocks string[]
- {[key: string]: string}
- displayName string
- dnsLabel string
- {[key: string]: string}
- ipv6privateCidr string[]Blocks 
- isIpv6enabled boolean
- isOracle booleanGua Allocation Enabled 
- securityAttributes {[key: string]: string}
- compartment_id str
- byoipv6cidr_details Sequence[VirtualNetwork Byoipv6cidr Detail Args] 
- cidr_block str
- cidr_blocks Sequence[str]
- Mapping[str, str]
- display_name str
- dns_label str
- Mapping[str, str]
- ipv6private_cidr_ Sequence[str]blocks 
- is_ipv6enabled bool
- is_oracle_ boolgua_ allocation_ enabled 
- security_attributes Mapping[str, str]
- compartmentId String
- byoipv6cidrDetails List<Property Map>
- cidrBlock String
- cidrBlocks List<String>
- Map<String>
- displayName String
- dnsLabel String
- Map<String>
- ipv6privateCidr List<String>Blocks 
- isIpv6enabled Boolean
- isOracle BooleanGua Allocation Enabled 
- securityAttributes Map<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualNetwork resource produces the following output properties:
- Byoipv6cidrBlocks List<string>
- DefaultDhcp stringOptions Id 
- DefaultRoute stringTable Id 
- DefaultSecurity stringList Id 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6cidrBlocks List<string>
- State string
- TimeCreated string
- VcnDomain stringName 
- Byoipv6cidrBlocks []string
- DefaultDhcp stringOptions Id 
- DefaultRoute stringTable Id 
- DefaultSecurity stringList Id 
- Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6cidrBlocks []string
- State string
- TimeCreated string
- VcnDomain stringName 
- byoipv6cidrBlocks List<String>
- defaultDhcp StringOptions Id 
- defaultRoute StringTable Id 
- defaultSecurity StringList Id 
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6cidrBlocks List<String>
- state String
- timeCreated String
- vcnDomain StringName 
- byoipv6cidrBlocks string[]
- defaultDhcp stringOptions Id 
- defaultRoute stringTable Id 
- defaultSecurity stringList Id 
- id string
- The provider-assigned unique ID for this managed resource.
- ipv6cidrBlocks string[]
- state string
- timeCreated string
- vcnDomain stringName 
- byoipv6cidr_blocks Sequence[str]
- default_dhcp_ stroptions_ id 
- default_route_ strtable_ id 
- default_security_ strlist_ id 
- id str
- The provider-assigned unique ID for this managed resource.
- ipv6cidr_blocks Sequence[str]
- state str
- time_created str
- vcn_domain_ strname 
- byoipv6cidrBlocks List<String>
- defaultDhcp StringOptions Id 
- defaultRoute StringTable Id 
- defaultSecurity StringList Id 
- id String
- The provider-assigned unique ID for this managed resource.
- ipv6cidrBlocks List<String>
- state String
- timeCreated String
- vcnDomain StringName 
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[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, str]] = None,
        display_name: Optional[str] = None,
        dns_label: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = 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,
        security_attributes: Optional[Mapping[str, str]] = None,
        state: Optional[str] = None,
        time_created: Optional[str] = None,
        vcn_domain_name: Optional[str] = None) -> VirtualNetworkfunc 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)resources:  _:    type: oci:Core:VirtualNetwork    get:      id: ${id}- 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.
- Byoipv6cidrBlocks List<string>
- Byoipv6cidrDetails List<VirtualNetwork Byoipv6cidr Detail> 
- CidrBlock string
- CidrBlocks List<string>
- CompartmentId string
- DefaultDhcp stringOptions Id 
- DefaultRoute stringTable Id 
- DefaultSecurity stringList Id 
- Dictionary<string, string>
- DisplayName string
- DnsLabel string
- Dictionary<string, string>
- Ipv6cidrBlocks List<string>
- Ipv6privateCidr List<string>Blocks 
- IsIpv6enabled bool
- IsOracle boolGua Allocation Enabled 
- SecurityAttributes Dictionary<string, string>
- State string
- TimeCreated string
- VcnDomain stringName 
- Byoipv6cidrBlocks []string
- Byoipv6cidrDetails []VirtualNetwork Byoipv6cidr Detail Args 
- CidrBlock string
- CidrBlocks []string
- CompartmentId string
- DefaultDhcp stringOptions Id 
- DefaultRoute stringTable Id 
- DefaultSecurity stringList Id 
- map[string]string
- DisplayName string
- DnsLabel string
- map[string]string
- Ipv6cidrBlocks []string
- Ipv6privateCidr []stringBlocks 
- IsIpv6enabled bool
- IsOracle boolGua Allocation Enabled 
- SecurityAttributes map[string]string
- State string
- TimeCreated string
- VcnDomain stringName 
- byoipv6cidrBlocks List<String>
- byoipv6cidrDetails List<VirtualNetwork Byoipv6cidr Detail> 
- cidrBlock String
- cidrBlocks List<String>
- compartmentId String
- defaultDhcp StringOptions Id 
- defaultRoute StringTable Id 
- defaultSecurity StringList Id 
- Map<String,String>
- displayName String
- dnsLabel String
- Map<String,String>
- ipv6cidrBlocks List<String>
- ipv6privateCidr List<String>Blocks 
- isIpv6enabled Boolean
- isOracle BooleanGua Allocation Enabled 
- securityAttributes Map<String,String>
- state String
- timeCreated String
- vcnDomain StringName 
- byoipv6cidrBlocks string[]
- byoipv6cidrDetails VirtualNetwork Byoipv6cidr Detail[] 
- cidrBlock string
- cidrBlocks string[]
- compartmentId string
- defaultDhcp stringOptions Id 
- defaultRoute stringTable Id 
- defaultSecurity stringList Id 
- {[key: string]: string}
- displayName string
- dnsLabel string
- {[key: string]: string}
- ipv6cidrBlocks string[]
- ipv6privateCidr string[]Blocks 
- isIpv6enabled boolean
- isOracle booleanGua Allocation Enabled 
- securityAttributes {[key: string]: string}
- state string
- timeCreated string
- vcnDomain stringName 
- byoipv6cidr_blocks Sequence[str]
- byoipv6cidr_details Sequence[VirtualNetwork Byoipv6cidr Detail Args] 
- cidr_block str
- cidr_blocks Sequence[str]
- compartment_id str
- default_dhcp_ stroptions_ id 
- default_route_ strtable_ id 
- default_security_ strlist_ id 
- Mapping[str, str]
- display_name str
- dns_label str
- Mapping[str, str]
- ipv6cidr_blocks Sequence[str]
- ipv6private_cidr_ Sequence[str]blocks 
- is_ipv6enabled bool
- is_oracle_ boolgua_ allocation_ enabled 
- security_attributes Mapping[str, str]
- state str
- time_created str
- vcn_domain_ strname 
- byoipv6cidrBlocks List<String>
- byoipv6cidrDetails List<Property Map>
- cidrBlock String
- cidrBlocks List<String>
- compartmentId String
- defaultDhcp StringOptions Id 
- defaultRoute StringTable Id 
- defaultSecurity StringList Id 
- Map<String>
- displayName String
- dnsLabel String
- Map<String>
- ipv6cidrBlocks List<String>
- ipv6privateCidr List<String>Blocks 
- isIpv6enabled Boolean
- isOracle BooleanGua Allocation Enabled 
- securityAttributes Map<String>
- state String
- timeCreated String
- vcnDomain StringName 
Supporting Types
VirtualNetworkByoipv6cidrDetail, VirtualNetworkByoipv6cidrDetailArgs        
- Byoipv6rangeId string
- Ipv6cidrBlock string
- Byoipv6rangeId string
- Ipv6cidrBlock string
- byoipv6rangeId String
- ipv6cidrBlock String
- byoipv6rangeId string
- ipv6cidrBlock string
- byoipv6range_id str
- ipv6cidr_block str
- byoipv6rangeId String
- ipv6cidrBlock String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.
