Class Vnic
A virtual network interface card. Each VNIC resides in a subnet in a VCN.
An instance attaches to a VNIC to obtain a network connection into the VCN
through that subnet. Each instance has a primary VNIC that is automatically
created and attached during launch. You can add secondary VNICs to an
instance after it's launched. For more information, see
Virtual Network Interface Cards (VNICs).
Each VNIC has a primary private IP that is automatically assigned during launch.
You can add secondary private IPs to a VNIC after it's created. For more
information, see {@link #createPrivateIp(CreatePrivateIpRequest) createPrivateIp} and
IP Addresses.
If you are an Oracle Cloud VMware Solution customer, you will have secondary VNICs
that reside in a VLAN instead of a subnet. These VNICs have other differences, which
are called out in the descriptions of the relevant attributes in the Vnic
object.
Also see {@link Vlan}.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,
talk to an administrator. If you're an administrator who needs to write policies to give users access, see
Getting Started with Policies.
Inherited Members
Namespace: Oci.VnmonitoringService.Models
Assembly: OCI.DotNetSDK.Vnmonitoring.dll
Syntax
public class Vnic
Properties
AvailabilityDomain
Declaration
[Required(ErrorMessage = "AvailabilityDomain is required.")]
[JsonProperty(PropertyName = "availabilityDomain")]
public string AvailabilityDomain { get; set; }
Property Value
Type | Description |
---|---|
string | The VNIC's availability domain.
|
Remarks
Required
CompartmentId
Declaration
[Required(ErrorMessage = "CompartmentId is required.")]
[JsonProperty(PropertyName = "compartmentId")]
public string CompartmentId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the compartment containing the VNIC. |
Remarks
Required
DefinedTags
Declaration
[JsonProperty(PropertyName = "definedTags")]
public Dictionary<string, Dictionary<string, object>> DefinedTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, Dictionary<string, object>> | Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace": {"bar-key": "value"}} |
DisplayName
Declaration
[JsonProperty(PropertyName = "displayName")]
public string DisplayName { get; set; }
Property Value
Type | Description |
---|---|
string | A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. |
FreeformTags
Declaration
[JsonProperty(PropertyName = "freeformTags")]
public Dictionary<string, string> FreeformTags { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<string, string> | Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"} |
HostnameLabel
Declaration
[JsonProperty(PropertyName = "hostnameLabel")]
public string HostnameLabel { get; set; }
Property Value
Type | Description |
---|---|
string | The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname
portion of the primary private IP's fully qualified domain name (FQDN)
(for example, |
Id
Declaration
[Required(ErrorMessage = "Id is required.")]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the VNIC. |
Remarks
Required
IsPrimary
Declaration
[JsonProperty(PropertyName = "isPrimary")]
public bool? IsPrimary { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch). |
LifecycleState
Declaration
[Required(ErrorMessage = "LifecycleState is required.")]
[JsonProperty(PropertyName = "lifecycleState")]
[JsonConverter(typeof(StringEnumConverter))]
public Vnic.LifecycleStateEnum? LifecycleState { get; set; }
Property Value
Type | Description |
---|---|
Vnic.LifecycleStateEnum? | The current state of the VNIC. |
Remarks
Required
MacAddress
Declaration
[JsonProperty(PropertyName = "macAddress")]
public string MacAddress { get; set; }
Property Value
Type | Description |
---|---|
string | The MAC address of the VNIC.
|
NsgIds
Declaration
[JsonProperty(PropertyName = "nsgIds")]
public List<string> NsgIds { get; set; }
Property Value
Type | Description |
---|---|
List<string> | A list of the OCIDs of the network security groups that the VNIC belongs to.
|
PrivateIp
Declaration
[JsonProperty(PropertyName = "privateIp")]
public string PrivateIp { get; set; }
Property Value
Type | Description |
---|---|
string | The private IP address of the primary |
PublicIp
Declaration
[JsonProperty(PropertyName = "publicIp")]
public string PublicIp { get; set; }
Property Value
Type | Description |
---|---|
string | The public IP address of the VNIC, if one is assigned. |
SkipSourceDestCheck
Declaration
[JsonProperty(PropertyName = "skipSourceDestCheck")]
public bool? SkipSourceDestCheck { get; set; }
Property Value
Type | Description |
---|---|
bool? | Whether the source/destination check is disabled on the VNIC.
Defaults to If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of
belonging to a subnet), the |
SubnetId
Declaration
[JsonProperty(PropertyName = "subnetId")]
public string SubnetId { get; set; }
Property Value
Type | Description |
---|---|
string | The OCID of the subnet the VNIC is in. |
TimeCreated
Declaration
[Required(ErrorMessage = "TimeCreated is required.")]
[JsonProperty(PropertyName = "timeCreated")]
public DateTime? TimeCreated { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | The date and time the VNIC was created, in the format defined by RFC3339.
|
Remarks
Required
VlanId
Declaration
[JsonProperty(PropertyName = "vlanId")]
public string VlanId { get; set; }
Property Value
Type | Description |
---|---|
string | If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of
belonging to a subnet), the |