VnicAttachment

class oci.core.models.VnicAttachment(**kwargs)

Bases: object

Represents an attachment between a VNIC and an instance. For more information, see Virtual Network Interface Cards (VNICs).

Warning: Oracle recommends that you avoid using any confidential information when you supply string values using the API.

Attributes:

LIFECYCLE_STATE_ATTACHED

A constant which can be used with the lifecycle_state property of a VnicAttachment.

LIFECYCLE_STATE_ATTACHING

A constant which can be used with the lifecycle_state property of a VnicAttachment.

LIFECYCLE_STATE_DETACHED

A constant which can be used with the lifecycle_state property of a VnicAttachment.

LIFECYCLE_STATE_DETACHING

A constant which can be used with the lifecycle_state property of a VnicAttachment.

availability_domain

[Required] Gets the availability_domain of this VnicAttachment.

compartment_id

[Required] Gets the compartment_id of this VnicAttachment.

display_name

Gets the display_name of this VnicAttachment.

id

[Required] Gets the id of this VnicAttachment.

instance_id

[Required] Gets the instance_id of this VnicAttachment.

lifecycle_state

[Required] Gets the lifecycle_state of this VnicAttachment.

nic_index

Gets the nic_index of this VnicAttachment.

subnet_id

Gets the subnet_id of this VnicAttachment.

time_created

[Required] Gets the time_created of this VnicAttachment.

vlan_id

Gets the vlan_id of this VnicAttachment.

vlan_tag

Gets the vlan_tag of this VnicAttachment.

vnic_id

Gets the vnic_id of this VnicAttachment.

Methods:

__init__(**kwargs)

Initializes a new VnicAttachment object with values from keyword arguments.

LIFECYCLE_STATE_ATTACHED = 'ATTACHED'

A constant which can be used with the lifecycle_state property of a VnicAttachment. This constant has a value of “ATTACHED”

LIFECYCLE_STATE_ATTACHING = 'ATTACHING'

A constant which can be used with the lifecycle_state property of a VnicAttachment. This constant has a value of “ATTACHING”

LIFECYCLE_STATE_DETACHED = 'DETACHED'

A constant which can be used with the lifecycle_state property of a VnicAttachment. This constant has a value of “DETACHED”

LIFECYCLE_STATE_DETACHING = 'DETACHING'

A constant which can be used with the lifecycle_state property of a VnicAttachment. This constant has a value of “DETACHING”

__init__(**kwargs)

Initializes a new VnicAttachment object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • availability_domain (str) – The value to assign to the availability_domain property of this VnicAttachment.

  • compartment_id (str) – The value to assign to the compartment_id property of this VnicAttachment.

  • display_name (str) – The value to assign to the display_name property of this VnicAttachment.

  • id (str) – The value to assign to the id property of this VnicAttachment.

  • instance_id (str) – The value to assign to the instance_id property of this VnicAttachment.

  • lifecycle_state (str) – The value to assign to the lifecycle_state property of this VnicAttachment. Allowed values for this property are: “ATTACHING”, “ATTACHED”, “DETACHING”, “DETACHED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • nic_index (int) – The value to assign to the nic_index property of this VnicAttachment.

  • subnet_id (str) – The value to assign to the subnet_id property of this VnicAttachment.

  • vlan_id (str) – The value to assign to the vlan_id property of this VnicAttachment.

  • time_created (datetime) – The value to assign to the time_created property of this VnicAttachment.

  • vlan_tag (int) – The value to assign to the vlan_tag property of this VnicAttachment.

  • vnic_id (str) – The value to assign to the vnic_id property of this VnicAttachment.

property availability_domain

[Required] Gets the availability_domain of this VnicAttachment. The availability domain of the instance.

Example: Uocm:PHX-AD-1

Returns

The availability_domain of this VnicAttachment.

Return type

str

property compartment_id

[Required] Gets the compartment_id of this VnicAttachment. The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.

Returns

The compartment_id of this VnicAttachment.

Return type

str

property display_name

Gets the display_name of this VnicAttachment. A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.

Returns

The display_name of this VnicAttachment.

Return type

str

property id

[Required] Gets the id of this VnicAttachment. The OCID of the VNIC attachment.

Returns

The id of this VnicAttachment.

Return type

str

property instance_id

[Required] Gets the instance_id of this VnicAttachment. The OCID of the instance.

Returns

The instance_id of this VnicAttachment.

Return type

str

property lifecycle_state

[Required] Gets the lifecycle_state of this VnicAttachment. The current state of the VNIC attachment.

Allowed values for this property are: “ATTACHING”, “ATTACHED”, “DETACHING”, “DETACHED”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The lifecycle_state of this VnicAttachment.

Return type

str

property nic_index

Gets the nic_index of this VnicAttachment. Which physical network interface card (NIC) the VNIC uses. Certain bare metal instance shapes have two active physical NICs (0 and 1). If you add a secondary VNIC to one of these instances, you can specify which NIC the VNIC will use. For more information, see Virtual Network Interface Cards (VNICs).

Returns

The nic_index of this VnicAttachment.

Return type

int

property subnet_id

Gets the subnet_id of this VnicAttachment. The OCID of the subnet to create the VNIC in.

Returns

The subnet_id of this VnicAttachment.

Return type

str

property time_created

[Required] Gets the time_created of this VnicAttachment. The date and time the VNIC attachment was created, in the format defined by RFC3339.

Example: 2016-08-25T21:10:29.600Z

Returns

The time_created of this VnicAttachment.

Return type

datetime

property vlan_id

Gets the vlan_id of this VnicAttachment. The OCID of the VLAN to create the VNIC in. Creating the VNIC in a VLAN (instead of a subnet) is possible only if you are an Oracle Cloud VMware Solution customer. See Vlan.

An error is returned if the instance already has a VNIC attached to it from this VLAN.

Returns

The vlan_id of this VnicAttachment.

Return type

str

property vlan_tag

Gets the vlan_tag of this VnicAttachment. The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.

However, if the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution, the vlanTag value is instead the value of the vlanTag attribute for the VLAN. See Vlan.

Example: 0

Returns

The vlan_tag of this VnicAttachment.

Return type

int

property vnic_id

Gets the vnic_id of this VnicAttachment. The OCID of the VNIC. Available after the attachment process is complete.

Returns

The vnic_id of this VnicAttachment.

Return type

str