1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Core
  5. getVnic
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Core.getVnic

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about a specific Vnic resource in Oracle Cloud Infrastructure Core service.

    Gets the information for the specified virtual network interface card (VNIC). You can get the VNIC OCID from the ListVnicAttachments operation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVnic = oci.Core.getVnic({
        vnicId: testVnicOciCoreVnic.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_vnic = oci.Core.get_vnic(vnic_id=test_vnic_oci_core_vnic["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Core"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Core.GetVnic(ctx, &core.GetVnicArgs{
    			VnicId: testVnicOciCoreVnic.Id,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testVnic = Oci.Core.GetVnic.Invoke(new()
        {
            VnicId = testVnicOciCoreVnic.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Core.CoreFunctions;
    import com.pulumi.oci.Core.inputs.GetVnicArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var testVnic = CoreFunctions.getVnic(GetVnicArgs.builder()
                .vnicId(testVnicOciCoreVnic.id())
                .build());
    
        }
    }
    
    variables:
      testVnic:
        fn::invoke:
          Function: oci:Core:getVnic
          Arguments:
            vnicId: ${testVnicOciCoreVnic.id}
    

    Using getVnic

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getVnic(args: GetVnicArgs, opts?: InvokeOptions): Promise<GetVnicResult>
    function getVnicOutput(args: GetVnicOutputArgs, opts?: InvokeOptions): Output<GetVnicResult>
    def get_vnic(vnic_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetVnicResult
    def get_vnic_output(vnic_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetVnicResult]
    func GetVnic(ctx *Context, args *GetVnicArgs, opts ...InvokeOption) (*GetVnicResult, error)
    func GetVnicOutput(ctx *Context, args *GetVnicOutputArgs, opts ...InvokeOption) GetVnicResultOutput

    > Note: This function is named GetVnic in the Go SDK.

    public static class GetVnic 
    {
        public static Task<GetVnicResult> InvokeAsync(GetVnicArgs args, InvokeOptions? opts = null)
        public static Output<GetVnicResult> Invoke(GetVnicInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVnicResult> getVnic(GetVnicArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Core/getVnic:getVnic
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VnicId string
    The OCID of the VNIC.
    VnicId string
    The OCID of the VNIC.
    vnicId String
    The OCID of the VNIC.
    vnicId string
    The OCID of the VNIC.
    vnic_id str
    The OCID of the VNIC.
    vnicId String
    The OCID of the VNIC.

    getVnic Result

    The following output properties are available:

    AvailabilityDomain string
    The VNIC's availability domain. Example: Uocm:PHX-AD-1
    CompartmentId string
    The OCID of the compartment containing the VNIC.
    DefinedTags Dictionary<string, string>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    HostnameLabel 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, 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.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6addresses List<string>
    List of IPv6 addresses assigned to the VNIC. Example: 2001:DB8::
    IsPrimary bool
    Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch).
    MacAddress string
    The MAC address of the VNIC.
    NsgIds List<string>
    A list of the OCIDs of the network security groups that the VNIC belongs to.
    PrivateIpAddress string
    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
    PublicIpAddress string
    The public IP address of the VNIC, if one is assigned.
    SecurityAttributes Dictionary<string, string>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    SkipSourceDestCheck bool
    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.
    State string
    The current state of the VNIC.
    SubnetId string
    The OCID of the subnet the VNIC is in.
    TimeCreated string
    The date and time the VNIC was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string
    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.
    VnicId string
    AvailabilityDomain string
    The VNIC's availability domain. Example: Uocm:PHX-AD-1
    CompartmentId string
    The OCID of the compartment containing the VNIC.
    DefinedTags map[string]string
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    DisplayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    FreeformTags map[string]string
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    HostnameLabel 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, 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.
    Id string
    The provider-assigned unique ID for this managed resource.
    Ipv6addresses []string
    List of IPv6 addresses assigned to the VNIC. Example: 2001:DB8::
    IsPrimary bool
    Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch).
    MacAddress string
    The MAC address of the VNIC.
    NsgIds []string
    A list of the OCIDs of the network security groups that the VNIC belongs to.
    PrivateIpAddress string
    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
    PublicIpAddress string
    The public IP address of the VNIC, if one is assigned.
    SecurityAttributes map[string]string
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    SkipSourceDestCheck bool
    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.
    State string
    The current state of the VNIC.
    SubnetId string
    The OCID of the subnet the VNIC is in.
    TimeCreated string
    The date and time the VNIC was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    VlanId string
    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.
    VnicId string
    availabilityDomain String
    The VNIC's availability domain. Example: Uocm:PHX-AD-1
    compartmentId String
    The OCID of the compartment containing the VNIC.
    definedTags Map<String,String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String,String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostnameLabel 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, 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.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6addresses List<String>
    List of IPv6 addresses assigned to the VNIC. Example: 2001:DB8::
    isPrimary Boolean
    Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch).
    macAddress String
    The MAC address of the VNIC.
    nsgIds List<String>
    A list of the OCIDs of the network security groups that the VNIC belongs to.
    privateIpAddress String
    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
    publicIpAddress String
    The public IP address of the VNIC, if one is assigned.
    securityAttributes Map<String,String>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skipSourceDestCheck Boolean
    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.
    state String
    The current state of the VNIC.
    subnetId String
    The OCID of the subnet the VNIC is in.
    timeCreated String
    The date and time the VNIC was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String
    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.
    vnicId String
    availabilityDomain string
    The VNIC's availability domain. Example: Uocm:PHX-AD-1
    compartmentId string
    The OCID of the compartment containing the VNIC.
    definedTags {[key: string]: string}
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName string
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostnameLabel 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, 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.
    id string
    The provider-assigned unique ID for this managed resource.
    ipv6addresses string[]
    List of IPv6 addresses assigned to the VNIC. Example: 2001:DB8::
    isPrimary boolean
    Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch).
    macAddress string
    The MAC address of the VNIC.
    nsgIds string[]
    A list of the OCIDs of the network security groups that the VNIC belongs to.
    privateIpAddress string
    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
    publicIpAddress string
    The public IP address of the VNIC, if one is assigned.
    securityAttributes {[key: string]: string}
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skipSourceDestCheck boolean
    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.
    state string
    The current state of the VNIC.
    subnetId string
    The OCID of the subnet the VNIC is in.
    timeCreated string
    The date and time the VNIC was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId string
    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.
    vnicId string
    availability_domain str
    The VNIC's availability domain. Example: Uocm:PHX-AD-1
    compartment_id str
    The OCID of the compartment containing the VNIC.
    defined_tags Mapping[str, str]
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    display_name str
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostname_label str
    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.
    id str
    The provider-assigned unique ID for this managed resource.
    ipv6addresses Sequence[str]
    List of IPv6 addresses assigned to the VNIC. Example: 2001:DB8::
    is_primary bool
    Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch).
    mac_address str
    The MAC address of the VNIC.
    nsg_ids Sequence[str]
    A list of the OCIDs of the network security groups that the VNIC belongs to.
    private_ip_address str
    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
    public_ip_address str
    The public IP address of the VNIC, if one is assigned.
    security_attributes Mapping[str, str]
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skip_source_dest_check bool
    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.
    state str
    The current state of the VNIC.
    subnet_id str
    The OCID of the subnet the VNIC is in.
    time_created str
    The date and time the VNIC was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlan_id str
    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.
    vnic_id str
    availabilityDomain String
    The VNIC's availability domain. Example: Uocm:PHX-AD-1
    compartmentId String
    The OCID of the compartment containing the VNIC.
    definedTags Map<String>
    Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    displayName String
    A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
    freeformTags Map<String>
    Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    hostnameLabel 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, 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.
    id String
    The provider-assigned unique ID for this managed resource.
    ipv6addresses List<String>
    List of IPv6 addresses assigned to the VNIC. Example: 2001:DB8::
    isPrimary Boolean
    Whether the VNIC is the primary VNIC (the VNIC that is automatically created and attached during instance launch).
    macAddress String
    The MAC address of the VNIC.
    nsgIds List<String>
    A list of the OCIDs of the network security groups that the VNIC belongs to.
    privateIpAddress String
    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
    publicIpAddress String
    The public IP address of the VNIC, if one is assigned.
    securityAttributes Map<String>
    Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example: {"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
    skipSourceDestCheck Boolean
    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.
    state String
    The current state of the VNIC.
    subnetId String
    The OCID of the subnet the VNIC is in.
    timeCreated String
    The date and time the VNIC was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    vlanId String
    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.
    vnicId String

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi