Class Vnic.Builder

  • Enclosing class:
    Vnic

    public static class Vnic.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • availabilityDomain

        public Vnic.Builder availabilityDomain​(String availabilityDomain)
        The VNIC’s availability domain.

        Example: Uocm:PHX-AD-1

        Parameters:
        availabilityDomain - the value to set
        Returns:
        this builder
      • compartmentId

        public Vnic.Builder compartmentId​(String compartmentId)
        The OCID of the compartment containing the VNIC.
        Parameters:
        compartmentId - the value to set
        Returns:
        this builder
      • definedTags

        public Vnic.Builder definedTags​(Map<String,​Map<String,​Object>> definedTags)
        Defined tags for this resource.

        Each key is predefined and scoped to a namespace. Example: {“foo-namespace”: {“bar-key”: “value”}}

        Parameters:
        definedTags - the value to set
        Returns:
        this builder
      • displayName

        public Vnic.Builder displayName​(String displayName)
        A user-friendly name.

        Does not have to be unique, and it’s changeable. Avoid entering confidential information.

        Parameters:
        displayName - the value to set
        Returns:
        this builder
      • freeformTags

        public Vnic.Builder freeformTags​(Map<String,​String> freeformTags)
        Simple key-value pair that is applied without any predefined name, type or scope.

        Exists for cross-compatibility only. Example: {“bar-key”: “value”}

        Parameters:
        freeformTags - the value to set
        Returns:
        this builder
      • hostnameLabel

        public Vnic.Builder hostnameLabel​(String hostnameLabel)
        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, bminstance1 in FQDN bminstance1.subnet123.vcn1.oraclevcn.com). Must be unique across all VNICs in the subnet and comply with RFC 952 and RFC 1123.

        For more information, see [DNS in Your Virtual Cloud Network](https://docs.oracle.com/iaas/Content/Network/Concepts/dns.htm).

        Example: bminstance1

        Parameters:
        hostnameLabel - the value to set
        Returns:
        this builder
      • id

        public Vnic.Builder id​(String id)
        The OCID of the VNIC.
        Parameters:
        id - the value to set
        Returns:
        this builder
      • isPrimary

        public Vnic.Builder isPrimary​(Boolean isPrimary)
        Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch).
        Parameters:
        isPrimary - the value to set
        Returns:
        this builder
      • lifecycleState

        public Vnic.Builder lifecycleState​(Vnic.LifecycleState lifecycleState)
        The current state of the VNIC.
        Parameters:
        lifecycleState - the value to set
        Returns:
        this builder
      • macAddress

        public Vnic.Builder macAddress​(String macAddress)
        The MAC address of the VNIC.

        If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution, the MAC address is learned. If the VNIC belongs to a subnet, the MAC address is a static, Oracle-provided value.

        Example: 00:00:00:00:00:01

        Parameters:
        macAddress - the value to set
        Returns:
        this builder
      • nsgIds

        public Vnic.Builder nsgIds​(List<String> nsgIds)
        A list of the OCIDs of the network security groups that the VNIC belongs to.

        If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of belonging to a subnet), the value of the nsgIds attribute is ignored. Instead, the VNIC belongs to the NSGs that are associated with the VLAN itself. See Vlan.

        For more information about NSGs, see NetworkSecurityGroup.

        Parameters:
        nsgIds - the value to set
        Returns:
        this builder
      • vlanId

        public Vnic.Builder vlanId​(String vlanId)
        If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of belonging to a subnet), the vlanId is the OCID of the VLAN the VNIC is in.

        See Vlan. If the VNIC is instead in a subnet, subnetId has a value.

        Parameters:
        vlanId - the value to set
        Returns:
        this builder
      • privateIp

        public Vnic.Builder privateIp​(String privateIp)
        The private IP address of the primary privateIp object on the VNIC.

        The address is within the CIDR of the VNIC’s subnet.

        Example: 10.0.3.3

        Parameters:
        privateIp - the value to set
        Returns:
        this builder
      • publicIp

        public Vnic.Builder publicIp​(String publicIp)
        The public IP address of the VNIC, if one is assigned.
        Parameters:
        publicIp - the value to set
        Returns:
        this builder
      • skipSourceDestCheck

        public Vnic.Builder skipSourceDestCheck​(Boolean skipSourceDestCheck)
        Whether the source/destination check is disabled on the VNIC.

        Defaults to false, which means the check is performed. For information about why you would skip the source/destination check, see Using a Private IP as a Route Target.

        If the VNIC belongs to a VLAN as part of the Oracle Cloud VMware Solution (instead of belonging to a subnet), the skipSourceDestCheck attribute is true. This is because the source/destination check is always disabled for VNICs in a VLAN.

        Example: true

        Parameters:
        skipSourceDestCheck - the value to set
        Returns:
        this builder
      • subnetId

        public Vnic.Builder subnetId​(String subnetId)
        The OCID of the subnet the VNIC is in.
        Parameters:
        subnetId - the value to set
        Returns:
        this builder
      • timeCreated

        public Vnic.Builder timeCreated​(Date timeCreated)
        The date and time the VNIC was created, in the format defined by RFC3339.

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

        Parameters:
        timeCreated - the value to set
        Returns:
        this builder
      • build

        public Vnic build()