oci.Core.VirtualNetwork
Explore with Pulumi AI
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, 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:
- Compartment
Id string - Byoipv6cidr
Details List<VirtualNetwork Byoipv6cidr Detail> - Cidr
Block string - Cidr
Blocks List<string> - Dictionary<string, string>
- Display
Name string - Dns
Label string - Dictionary<string, string>
- Ipv6private
Cidr List<string>Blocks - Is
Ipv6enabled bool - Is
Oracle boolGua Allocation Enabled - Security
Attributes Dictionary<string, string>
- Compartment
Id string - Byoipv6cidr
Details []VirtualNetwork Byoipv6cidr Detail Args - Cidr
Block string - Cidr
Blocks []string - map[string]string
- Display
Name string - Dns
Label string - map[string]string
- Ipv6private
Cidr []stringBlocks - Is
Ipv6enabled bool - Is
Oracle boolGua Allocation Enabled - Security
Attributes map[string]string
- compartment
Id String - byoipv6cidr
Details List<VirtualNetwork Byoipv6cidr Detail> - cidr
Block String - cidr
Blocks List<String> - Map<String,String>
- display
Name String - dns
Label String - Map<String,String>
- ipv6private
Cidr List<String>Blocks - is
Ipv6enabled Boolean - is
Oracle BooleanGua Allocation Enabled - security
Attributes Map<String,String>
- compartment
Id string - byoipv6cidr
Details VirtualNetwork Byoipv6cidr Detail[] - cidr
Block string - cidr
Blocks string[] - {[key: string]: string}
- display
Name string - dns
Label string - {[key: string]: string}
- ipv6private
Cidr string[]Blocks - is
Ipv6enabled boolean - is
Oracle booleanGua Allocation Enabled - security
Attributes {[key: string]: string}
- compartment_
id str - byoipv6cidr_
details Sequence[core.Virtual Network 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]
- compartment
Id String - byoipv6cidr
Details List<Property Map> - cidr
Block String - cidr
Blocks List<String> - Map<String>
- display
Name String - dns
Label String - Map<String>
- ipv6private
Cidr List<String>Blocks - is
Ipv6enabled Boolean - is
Oracle BooleanGua Allocation Enabled - security
Attributes Map<String>
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualNetwork resource produces the following output properties:
- Byoipv6cidr
Blocks List<string> - Default
Dhcp stringOptions Id - Default
Route stringTable Id - Default
Security stringList Id - Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6cidr
Blocks List<string> - State string
- Time
Created string - Vcn
Domain stringName
- Byoipv6cidr
Blocks []string - Default
Dhcp stringOptions Id - Default
Route stringTable Id - Default
Security stringList Id - Id string
- The provider-assigned unique ID for this managed resource.
- Ipv6cidr
Blocks []string - State string
- Time
Created string - Vcn
Domain stringName
- byoipv6cidr
Blocks List<String> - default
Dhcp StringOptions Id - default
Route StringTable Id - default
Security StringList Id - id String
- The provider-assigned unique ID for this managed resource.
- ipv6cidr
Blocks List<String> - state String
- time
Created String - vcn
Domain StringName
- byoipv6cidr
Blocks string[] - default
Dhcp stringOptions Id - default
Route stringTable Id - default
Security stringList Id - id string
- The provider-assigned unique ID for this managed resource.
- ipv6cidr
Blocks string[] - state string
- time
Created string - vcn
Domain 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
- byoipv6cidr
Blocks List<String> - default
Dhcp StringOptions Id - default
Route StringTable Id - default
Security StringList Id - id String
- The provider-assigned unique ID for this managed resource.
- ipv6cidr
Blocks List<String> - state String
- time
Created String - vcn
Domain 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[_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, 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) -> 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.
- Byoipv6cidr
Blocks List<string> - Byoipv6cidr
Details List<VirtualNetwork Byoipv6cidr Detail> - Cidr
Block string - Cidr
Blocks List<string> - Compartment
Id string - Default
Dhcp stringOptions Id - Default
Route stringTable Id - Default
Security stringList Id - Dictionary<string, string>
- Display
Name string - Dns
Label string - Dictionary<string, string>
- Ipv6cidr
Blocks List<string> - Ipv6private
Cidr List<string>Blocks - Is
Ipv6enabled bool - Is
Oracle boolGua Allocation Enabled - Security
Attributes Dictionary<string, string> - State string
- Time
Created string - Vcn
Domain stringName
- Byoipv6cidr
Blocks []string - Byoipv6cidr
Details []VirtualNetwork Byoipv6cidr Detail Args - Cidr
Block string - Cidr
Blocks []string - Compartment
Id string - Default
Dhcp stringOptions Id - Default
Route stringTable Id - Default
Security stringList Id - map[string]string
- Display
Name string - Dns
Label string - map[string]string
- Ipv6cidr
Blocks []string - Ipv6private
Cidr []stringBlocks - Is
Ipv6enabled bool - Is
Oracle boolGua Allocation Enabled - Security
Attributes map[string]string - State string
- Time
Created string - Vcn
Domain stringName
- byoipv6cidr
Blocks List<String> - byoipv6cidr
Details List<VirtualNetwork Byoipv6cidr Detail> - cidr
Block String - cidr
Blocks List<String> - compartment
Id String - default
Dhcp StringOptions Id - default
Route StringTable Id - default
Security StringList Id - Map<String,String>
- display
Name String - dns
Label String - Map<String,String>
- ipv6cidr
Blocks List<String> - ipv6private
Cidr List<String>Blocks - is
Ipv6enabled Boolean - is
Oracle BooleanGua Allocation Enabled - security
Attributes Map<String,String> - state String
- time
Created String - vcn
Domain StringName
- byoipv6cidr
Blocks string[] - byoipv6cidr
Details VirtualNetwork Byoipv6cidr Detail[] - cidr
Block string - cidr
Blocks string[] - compartment
Id string - default
Dhcp stringOptions Id - default
Route stringTable Id - default
Security stringList Id - {[key: string]: string}
- display
Name string - dns
Label string - {[key: string]: string}
- ipv6cidr
Blocks string[] - ipv6private
Cidr string[]Blocks - is
Ipv6enabled boolean - is
Oracle booleanGua Allocation Enabled - security
Attributes {[key: string]: string} - state string
- time
Created string - vcn
Domain stringName
- byoipv6cidr_
blocks Sequence[str] - byoipv6cidr_
details Sequence[core.Virtual Network 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
- byoipv6cidr
Blocks List<String> - byoipv6cidr
Details List<Property Map> - cidr
Block String - cidr
Blocks List<String> - compartment
Id String - default
Dhcp StringOptions Id - default
Route StringTable Id - default
Security StringList Id - Map<String>
- display
Name String - dns
Label String - Map<String>
- ipv6cidr
Blocks List<String> - ipv6private
Cidr List<String>Blocks - is
Ipv6enabled Boolean - is
Oracle BooleanGua Allocation Enabled - security
Attributes Map<String> - state String
- time
Created String - vcn
Domain StringName
Supporting Types
VirtualNetworkByoipv6cidrDetail, VirtualNetworkByoipv6cidrDetailArgs
- Byoipv6range
Id string - Ipv6cidr
Block string
- Byoipv6range
Id string - Ipv6cidr
Block string
- byoipv6range
Id String - ipv6cidr
Block String
- byoipv6range
Id string - ipv6cidr
Block string
- byoipv6range_
id str - ipv6cidr_
block str
- byoipv6range
Id String - ipv6cidr
Block String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.