Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Core.getVnicAttachments
Explore with Pulumi AI
This data source provides the list of Vnic Attachments in Oracle Cloud Infrastructure Core service.
Lists the VNIC attachments in the specified compartment. A VNIC attachment resides in the same compartment as the attached instance. The list can be filtered by instance, VNIC, or availability domain.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testVnicAttachments = oci.Core.getVnicAttachments({
compartmentId: compartmentId,
availabilityDomain: vnicAttachmentAvailabilityDomain,
instanceId: testInstance.id,
vnicId: testVnic.id,
});
import pulumi
import pulumi_oci as oci
test_vnic_attachments = oci.Core.get_vnic_attachments(compartment_id=compartment_id,
availability_domain=vnic_attachment_availability_domain,
instance_id=test_instance["id"],
vnic_id=test_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.GetVnicAttachments(ctx, &core.GetVnicAttachmentsArgs{
CompartmentId: compartmentId,
AvailabilityDomain: pulumi.StringRef(vnicAttachmentAvailabilityDomain),
InstanceId: pulumi.StringRef(testInstance.Id),
VnicId: pulumi.StringRef(testVnic.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 testVnicAttachments = Oci.Core.GetVnicAttachments.Invoke(new()
{
CompartmentId = compartmentId,
AvailabilityDomain = vnicAttachmentAvailabilityDomain,
InstanceId = testInstance.Id,
VnicId = testVnic.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.GetVnicAttachmentsArgs;
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 testVnicAttachments = CoreFunctions.getVnicAttachments(GetVnicAttachmentsArgs.builder()
.compartmentId(compartmentId)
.availabilityDomain(vnicAttachmentAvailabilityDomain)
.instanceId(testInstance.id())
.vnicId(testVnic.id())
.build());
}
}
variables:
testVnicAttachments:
fn::invoke:
Function: oci:Core:getVnicAttachments
Arguments:
compartmentId: ${compartmentId}
availabilityDomain: ${vnicAttachmentAvailabilityDomain}
instanceId: ${testInstance.id}
vnicId: ${testVnic.id}
Using getVnicAttachments
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 getVnicAttachments(args: GetVnicAttachmentsArgs, opts?: InvokeOptions): Promise<GetVnicAttachmentsResult>
function getVnicAttachmentsOutput(args: GetVnicAttachmentsOutputArgs, opts?: InvokeOptions): Output<GetVnicAttachmentsResult>
def get_vnic_attachments(availability_domain: Optional[str] = None,
compartment_id: Optional[str] = None,
filters: Optional[Sequence[_core.GetVnicAttachmentsFilter]] = None,
instance_id: Optional[str] = None,
vnic_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetVnicAttachmentsResult
def get_vnic_attachments_output(availability_domain: Optional[pulumi.Input[str]] = None,
compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_core.GetVnicAttachmentsFilterArgs]]]] = None,
instance_id: Optional[pulumi.Input[str]] = None,
vnic_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetVnicAttachmentsResult]
func GetVnicAttachments(ctx *Context, args *GetVnicAttachmentsArgs, opts ...InvokeOption) (*GetVnicAttachmentsResult, error)
func GetVnicAttachmentsOutput(ctx *Context, args *GetVnicAttachmentsOutputArgs, opts ...InvokeOption) GetVnicAttachmentsResultOutput
> Note: This function is named GetVnicAttachments
in the Go SDK.
public static class GetVnicAttachments
{
public static Task<GetVnicAttachmentsResult> InvokeAsync(GetVnicAttachmentsArgs args, InvokeOptions? opts = null)
public static Output<GetVnicAttachmentsResult> Invoke(GetVnicAttachmentsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetVnicAttachmentsResult> getVnicAttachments(GetVnicAttachmentsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Core/getVnicAttachments:getVnicAttachments
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment.
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Filters
List<Get
Vnic Attachments Filter> - Instance
Id string - The OCID of the instance.
- Vnic
Id string - The OCID of the VNIC.
- Compartment
Id string - The OCID of the compartment.
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Filters
[]Get
Vnic Attachments Filter - Instance
Id string - The OCID of the instance.
- Vnic
Id string - The OCID of the VNIC.
- compartment
Id String - The OCID of the compartment.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- filters
List<Get
Vnic Attachments Filter> - instance
Id String - The OCID of the instance.
- vnic
Id String - The OCID of the VNIC.
- compartment
Id string - The OCID of the compartment.
- availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- filters
Get
Vnic Attachments Filter[] - instance
Id string - The OCID of the instance.
- vnic
Id string - The OCID of the VNIC.
- compartment_
id str - The OCID of the compartment.
- availability_
domain str - The name of the availability domain. Example:
Uocm:PHX-AD-1
- filters
Sequence[core.
Get Vnic Attachments Filter] - instance_
id str - The OCID of the instance.
- vnic_
id str - The OCID of the VNIC.
- compartment
Id String - The OCID of the compartment.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- filters List<Property Map>
- instance
Id String - The OCID of the instance.
- vnic
Id String - The OCID of the VNIC.
getVnicAttachments Result
The following output properties are available:
- Compartment
Id string - The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
- Id string
- The provider-assigned unique ID for this managed resource.
- Vnic
Attachments List<GetVnic Attachments Vnic Attachment> - The list of vnic_attachments.
- Availability
Domain string - The availability domain of the instance. Example:
Uocm:PHX-AD-1
- Filters
List<Get
Vnic Attachments Filter> - Instance
Id string - The OCID of the instance.
- Vnic
Id string - The OCID of the VNIC. Available after the attachment process is complete.
- Compartment
Id string - The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
- Id string
- The provider-assigned unique ID for this managed resource.
- Vnic
Attachments []GetVnic Attachments Vnic Attachment - The list of vnic_attachments.
- Availability
Domain string - The availability domain of the instance. Example:
Uocm:PHX-AD-1
- Filters
[]Get
Vnic Attachments Filter - Instance
Id string - The OCID of the instance.
- Vnic
Id string - The OCID of the VNIC. Available after the attachment process is complete.
- compartment
Id String - The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
- id String
- The provider-assigned unique ID for this managed resource.
- vnic
Attachments List<GetVnic Attachments Vnic Attachment> - The list of vnic_attachments.
- availability
Domain String - The availability domain of the instance. Example:
Uocm:PHX-AD-1
- filters
List<Get
Vnic Attachments Filter> - instance
Id String - The OCID of the instance.
- vnic
Id String - The OCID of the VNIC. Available after the attachment process is complete.
- compartment
Id string - The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
- id string
- The provider-assigned unique ID for this managed resource.
- vnic
Attachments GetVnic Attachments Vnic Attachment[] - The list of vnic_attachments.
- availability
Domain string - The availability domain of the instance. Example:
Uocm:PHX-AD-1
- filters
Get
Vnic Attachments Filter[] - instance
Id string - The OCID of the instance.
- vnic
Id string - The OCID of the VNIC. Available after the attachment process is complete.
- compartment_
id str - The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
- id str
- The provider-assigned unique ID for this managed resource.
- vnic_
attachments Sequence[core.Get Vnic Attachments Vnic Attachment] - The list of vnic_attachments.
- availability_
domain str - The availability domain of the instance. Example:
Uocm:PHX-AD-1
- filters
Sequence[core.
Get Vnic Attachments Filter] - instance_
id str - The OCID of the instance.
- vnic_
id str - The OCID of the VNIC. Available after the attachment process is complete.
- compartment
Id String - The OCID of the compartment the VNIC attachment is in, which is the same compartment the instance is in.
- id String
- The provider-assigned unique ID for this managed resource.
- vnic
Attachments List<Property Map> - The list of vnic_attachments.
- availability
Domain String - The availability domain of the instance. Example:
Uocm:PHX-AD-1
- filters List<Property Map>
- instance
Id String - The OCID of the instance.
- vnic
Id String - The OCID of the VNIC. Available after the attachment process is complete.
Supporting Types
GetVnicAttachmentsFilter
GetVnicAttachmentsVnicAttachment
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string - The OCID of the compartment.
- Create
Vnic List<GetDetails Vnic Attachments Vnic Attachment Create Vnic Detail> - Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Id string
- The OCID of the VNIC attachment.
- Instance
Id string - The OCID of the instance.
- Nic
Index int - 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).
- State string
- The current state of the VNIC attachment.
- Subnet
Id string - The OCID of the subnet to create the VNIC in.
- Time
Created string - The date and time the VNIC attachment was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vlan
Id string - 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.
- Vlan
Tag int - The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
- Vnic
Id string - The OCID of the VNIC.
- Availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- Compartment
Id string - The OCID of the compartment.
- Create
Vnic []GetDetails Vnic Attachments Vnic Attachment Create Vnic Detail - Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Id string
- The OCID of the VNIC attachment.
- Instance
Id string - The OCID of the instance.
- Nic
Index int - 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).
- State string
- The current state of the VNIC attachment.
- Subnet
Id string - The OCID of the subnet to create the VNIC in.
- Time
Created string - The date and time the VNIC attachment was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Vlan
Id string - 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.
- Vlan
Tag int - The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
- Vnic
Id string - The OCID of the VNIC.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String - The OCID of the compartment.
- create
Vnic List<GetDetails Vnic Attachments Vnic Attachment Create Vnic Detail> - display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- id String
- The OCID of the VNIC attachment.
- instance
Id String - The OCID of the instance.
- nic
Index Integer - 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).
- state String
- The current state of the VNIC attachment.
- subnet
Id String - The OCID of the subnet to create the VNIC in.
- time
Created String - The date and time the VNIC attachment was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vlan
Id String - 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.
- vlan
Tag Integer - The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
- vnic
Id String - The OCID of the VNIC.
- availability
Domain string - The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id string - The OCID of the compartment.
- create
Vnic GetDetails Vnic Attachments Vnic Attachment Create Vnic Detail[] - display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- id string
- The OCID of the VNIC attachment.
- instance
Id string - The OCID of the instance.
- nic
Index number - 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).
- state string
- The current state of the VNIC attachment.
- subnet
Id string - The OCID of the subnet to create the VNIC in.
- time
Created string - The date and time the VNIC attachment was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vlan
Id string - 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.
- vlan
Tag number - The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
- vnic
Id string - The OCID of the VNIC.
- availability_
domain str - The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment_
id str - The OCID of the compartment.
- create_
vnic_ Sequence[core.details Get Vnic Attachments Vnic Attachment Create Vnic Detail] - display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- id str
- The OCID of the VNIC attachment.
- instance_
id str - The OCID of the instance.
- nic_
index int - 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).
- state str
- The current state of the VNIC attachment.
- subnet_
id str - The OCID of the subnet to create the VNIC in.
- time_
created str - The date and time the VNIC attachment was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vlan_
id str - 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.
- vlan_
tag int - The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
- vnic_
id str - The OCID of the VNIC.
- availability
Domain String - The name of the availability domain. Example:
Uocm:PHX-AD-1
- compartment
Id String - The OCID of the compartment.
- create
Vnic List<Property Map>Details - display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- id String
- The OCID of the VNIC attachment.
- instance
Id String - The OCID of the instance.
- nic
Index Number - 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).
- state String
- The current state of the VNIC attachment.
- subnet
Id String - The OCID of the subnet to create the VNIC in.
- time
Created String - The date and time the VNIC attachment was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- vlan
Id String - 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.
- vlan
Tag Number - The Oracle-assigned VLAN tag of the attached VNIC. Available after the attachment process is complete.
- vnic
Id String - The OCID of the VNIC.
GetVnicAttachmentsVnicAttachmentCreateVnicDetail
- Assign
Ipv6ip bool - Assign
Private boolDns Record - Assign
Public stringIp - Dictionary<string, string>
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Dictionary<string, string>
- Hostname
Label string - Ipv6address
Ipv6subnet List<GetCidr Pair Details Vnic Attachments Vnic Attachment Create Vnic Detail Ipv6address Ipv6subnet Cidr Pair Detail> - Nsg
Ids List<string> - Private
Ip string - Security
Attributes Dictionary<string, string> - Skip
Source boolDest Check - Subnet
Id string - The OCID of the subnet to create the VNIC in.
- Vlan
Id string - 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.
- Assign
Ipv6ip bool - Assign
Private boolDns Record - Assign
Public stringIp - map[string]string
- Display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- map[string]string
- Hostname
Label string - Ipv6address
Ipv6subnet []GetCidr Pair Details Vnic Attachments Vnic Attachment Create Vnic Detail Ipv6address Ipv6subnet Cidr Pair Detail - Nsg
Ids []string - Private
Ip string - Security
Attributes map[string]string - Skip
Source boolDest Check - Subnet
Id string - The OCID of the subnet to create the VNIC in.
- Vlan
Id string - 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.
- assign
Ipv6ip Boolean - assign
Private BooleanDns Record - assign
Public StringIp - Map<String,String>
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String,String>
- hostname
Label String - ipv6address
Ipv6subnet List<GetCidr Pair Details Vnic Attachments Vnic Attachment Create Vnic Detail Ipv6address Ipv6subnet Cidr Pair Detail> - nsg
Ids List<String> - private
Ip String - security
Attributes Map<String,String> - skip
Source BooleanDest Check - subnet
Id String - The OCID of the subnet to create the VNIC in.
- vlan
Id String - 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.
- assign
Ipv6ip boolean - assign
Private booleanDns Record - assign
Public stringIp - {[key: string]: string}
- display
Name string - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- {[key: string]: string}
- hostname
Label string - ipv6address
Ipv6subnet GetCidr Pair Details Vnic Attachments Vnic Attachment Create Vnic Detail Ipv6address Ipv6subnet Cidr Pair Detail[] - nsg
Ids string[] - private
Ip string - security
Attributes {[key: string]: string} - skip
Source booleanDest Check - subnet
Id string - The OCID of the subnet to create the VNIC in.
- vlan
Id string - 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.
- assign_
ipv6ip bool - assign_
private_ booldns_ record - assign_
public_ strip - Mapping[str, str]
- display_
name str - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Mapping[str, str]
- hostname_
label str - ipv6address_
ipv6subnet_ Sequence[core.cidr_ pair_ details Get Vnic Attachments Vnic Attachment Create Vnic Detail Ipv6address Ipv6subnet Cidr Pair Detail] - nsg_
ids Sequence[str] - private_
ip str - security_
attributes Mapping[str, str] - skip_
source_ booldest_ check - subnet_
id str - The OCID of the subnet to create the VNIC in.
- vlan_
id str - 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.
- assign
Ipv6ip Boolean - assign
Private BooleanDns Record - assign
Public StringIp - Map<String>
- display
Name String - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
- Map<String>
- hostname
Label String - ipv6address
Ipv6subnet List<Property Map>Cidr Pair Details - nsg
Ids List<String> - private
Ip String - security
Attributes Map<String> - skip
Source BooleanDest Check - subnet
Id String - The OCID of the subnet to create the VNIC in.
- vlan
Id String - 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.
GetVnicAttachmentsVnicAttachmentCreateVnicDetailIpv6addressIpv6subnetCidrPairDetail
- Ipv6Address string
- Ipv6Subnet
Cidr string
- Ipv6Address string
- Ipv6Subnet
Cidr string
- ipv6Address String
- ipv6Subnet
Cidr String
- ipv6Address string
- ipv6Subnet
Cidr string
- ipv6_
address str - ipv6_
subnet_ strcidr
- ipv6Address String
- ipv6Subnet
Cidr String
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.