AttachVnic

post

/20160918/vnicAttachments

Create a secondary VNIC and attach it to the specified instance.

Request

Supported Media Types
Query Parameters
Header Parameters
  • Networking resources in VCN among VMs. This will be provided by cvm team, and equal to containerVM ID.
  • Minimum Length: 1
    Maximum Length: 64
    A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated before then due to conflicting operations (for example, if a resource has been deleted and purged from the system, then a retry of the original creation request may be rejected).
  • Size of the VNIC. This is a special hypervisor-only VNIC shape, and will be provided by cvm team and is calculated from OCPUs.
Body ()
Attach VNIC details.
Root Schema : AttachVnicDetails
Type: object
Show Source
  • CreateVnicDetails
    Properties for a VNIC. Use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC.
  • Minimum Length: 1
    Maximum Length: 255
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
  • Minimum Length: 1
    Maximum Length: 255
    The OCID of the instance. For the AttachVnic operation, this is a required field for the request.
  • Minimum Value: 0
    Maximum Value: 31
    Which physical network interface card (NIC) the VNIC will use. Defaults to 0. 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.
Nested Schema : CreateVnicDetails
Type: object
Properties for a VNIC. Use this object when creating the primary VNIC during instance launch or when creating a secondary VNIC.
Show Source
  • Whether the VNIC should be assigned a DNS record. If assignPrivateDnsRecord is set to false, there will be no DNS record registration for the VNIC. If assignPrivateDnsRecord is set to true, the DNS record will be registered. The default value is true. If you specify a hostnameLabel, then assignPrivateDnsRecord must be set to true.
  • Whether the VNIC should be assigned a public IP address (true) or a private IP address (false). If assignPublicIp is not set and prohibitPublicIpOnVnic is true in the Subnet where the VNIC is being created, then no public IP address is assigned. If assignPublicIp is not set and prohibitPublicIpOnVnic is false, then a public IP address is assigned. This public IP address is associated with the primary private IP on the VNIC. If you specify a vlanId, then assignPublicIp must be set to false.
  • definedTags
    Additional Properties Allowed: additionalProperties
    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
  • Minimum Length: 1
    Maximum Length: 255
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
  • freeformTags
    Additional Properties Allowed: additionalProperties
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
  • Minimum Length: 1
    Maximum Length: 63
    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, myinstance-1 in FQDN myinstance-1.subnet123.vcn1.example.com). Must be unique across all VNICs in the subnet and comply with [RFC 952](https://tools.ietf.org/html/rfc952) and [RFC 1123](https://tools.ietf.org/html/rfc1123). The value appears in the Vnic object and also the PrivateIp object returned by ListPrivateIps and GetPrivateIp. When launching an instance, use this hostnameLabel instead of the deprecated hostnameLabel in LaunchInstanceDetails. If you provide both, the values must match. If you specify a vlanId, the hostnameLabel cannot be specified. VNICs on a VLAN cannot be assigned a hostname.
  • nsgIds
    Maximum Number of Items: 5
    Unique Items Required: true
    A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN.
  • Minimum Length: 1
    Maximum Length: 46
    A private IP address of your choice to assign to the VNIC. Must be an available IP address within the subnet's CIDR. If you don't specify a value, a private IP address is automatically assigned from the subnet. This is the VNIC's primary private IP address. The value appears in the Vnic object and also the PrivateIp object returned by ListPrivateIps and GetPrivateIp. If you specify a vlanId, the privateIp cannot be specified. Example: 10.0.3.3
  • Whether the source/destination check is disabled on the VNIC. Defaults to false, which means the check is performed. If you specify a vlanId, the skipSourceDestCheck cannot be specified because the source/destination check is always disabled for VNICs in a VLAN. Example: true
  • Minimum Length: 1
    Maximum Length: 255
    The OCID of the subnet to create the VNIC in. When launching an instance, use this subnetId instead of the deprecated subnetId in LaunchInstanceDetails. At least one of them is required; if you provide both, the values must match. If you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN instead of a subnet, provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.
  • Minimum Length: 1
    Maximum Length: 255
    Provide this attribute only if you are an Oracle Cloud VMware Solution customer and creating a secondary VNIC in a VLAN. The value is the OCID of the VLAN. Provide a vlanId instead of a subnetId. If you provide both a vlanId and subnetId, the request fails.
Nested Schema : definedTags
Type: object
Additional Properties Allowed
Show Source
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"Operations": {"CostCenter": "42"}}
Nested Schema : freeformTags
Type: object
Additional Properties Allowed
Show Source
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. Example: {"Department": "Finance"}
Nested Schema : nsgIds
Type: array
Maximum Number of Items: 5
Unique Items Required: true
A list of the OCIDs of the network security groups (NSGs) to add the VNIC to. If a vlanId is specified, the nsgIds cannot be specified. The vlanId indicates that the VNIC will belong to a VLAN instead of a subnet. With VLANs, all VNICs in the VLAN belong to the NSGs that are associated with the VLAN.
Show Source
Nested Schema : additionalProperties
Type: object
Additional Properties Allowed
Show Source
Key-value pair representing a defined tag key and value, scoped to a namespace. Example: {"CostCenter": "42"}
Nested Schema : additionalProperties
Type: object
The value of the tag. Only the String type is supported.
Back to Top

Response

Supported Media Types

200 Response

The VNIC is being attached.
Headers
  • For optimistic concurrency control. See if-match.
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : VnicAttachment
Type: object
Represents an attachment between a VNIC and an instance. Avoid entering confidential information when you supply string values using the API.
Show Source
  • Minimum Length: 1
    Maximum Length: 255
    The availability domain of the instance. Example: AD-1
  • Minimum Length: 1
    Maximum Length: 255
    The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
  • Minimum Length: 1
    Maximum Length: 255
    A user-friendly name. Does not need to be unique, and it is changeable. Avoid entering confidential information.
  • Minimum Length: 1
    Maximum Length: 255
    The OCID of the VNIC attachment.
  • Minimum Length: 1
    Maximum Length: 255
    The OCID of the instance.
  • Allowed Values: [ "ATTACHING", "ATTACHED", "DETACHING", "DETACHED" ]
    The current state of the VNIC attachment.
  • Minimum Value: 0
    Maximum Value: 31
    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.
  • Minimum Length: 1
    Maximum Length: 255
    The OCID of the subnet to create the VNIC in.
  • The date and time the VNIC attachment was created, in the format defined by [RFC3339](https://tools.ietf.org/html/rfc3339). Example: 2016-08-25T21:10:29.600Z
  • Minimum Length: 1
    Maximum Length: 255
    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. An error is returned if the instance already has a VNIC attached to it from this VLAN.
  • 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.
  • Minimum Length: 1
    Maximum Length: 255
    The OCID of the VNIC. Available after the attachment process is complete.

400 Response

Bad Request
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

401 Response

Unauthorized
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

404 Response

Not Found
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

409 Response

Conflict
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

500 Response

Internal Server Error
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source

Default Response

An error has occurred.
Headers
  • Unique Oracle-assigned identifier for the request. Provide this request OCID if you need to contact Oracle about this request.
Body ()
Root Schema : Error
Type: object
The properties that define an error.
Show Source
Back to Top