1. Packages
  2. Outscale Provider
  3. API Docs
  4. getNic
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

outscale.getNic

Explore with Pulumi AI

outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale

Provides information about a network interface card (NIC).

For more information on this resource, see the User Guide.
For more information on this resource actions, see the API documentation.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as outscale from "@pulumi/outscale";

const nic01 = outscale.getNic({
    filters: [{
        name: "nic_ids",
        values: ["eni-12345678"],
    }],
});
Copy
import pulumi
import pulumi_outscale as outscale

nic01 = outscale.get_nic(filters=[{
    "name": "nic_ids",
    "values": ["eni-12345678"],
}])
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/outscale/outscale"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := outscale.LookupNic(ctx, &outscale.LookupNicArgs{
			Filters: []outscale.GetNicFilter{
				{
					Name: "nic_ids",
					Values: []string{
						"eni-12345678",
					},
				},
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Outscale = Pulumi.Outscale;

return await Deployment.RunAsync(() => 
{
    var nic01 = Outscale.GetNic.Invoke(new()
    {
        Filters = new[]
        {
            new Outscale.Inputs.GetNicFilterInputArgs
            {
                Name = "nic_ids",
                Values = new[]
                {
                    "eni-12345678",
                },
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.outscale.OutscaleFunctions;
import com.pulumi.outscale.inputs.GetNicArgs;
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 nic01 = OutscaleFunctions.getNic(GetNicArgs.builder()
            .filters(GetNicFilterArgs.builder()
                .name("nic_ids")
                .values("eni-12345678")
                .build())
            .build());

    }
}
Copy
variables:
  nic01:
    fn::invoke:
      function: outscale:getNic
      arguments:
        filters:
          - name: nic_ids
            values:
              - eni-12345678
Copy

Using getNic

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 getNic(args: GetNicArgs, opts?: InvokeOptions): Promise<GetNicResult>
function getNicOutput(args: GetNicOutputArgs, opts?: InvokeOptions): Output<GetNicResult>
Copy
def get_nic(filters: Optional[Sequence[GetNicFilter]] = None,
            id: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetNicResult
def get_nic_output(filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetNicFilterArgs]]]] = None,
            id: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetNicResult]
Copy
func LookupNic(ctx *Context, args *LookupNicArgs, opts ...InvokeOption) (*LookupNicResult, error)
func LookupNicOutput(ctx *Context, args *LookupNicOutputArgs, opts ...InvokeOption) LookupNicResultOutput
Copy

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

public static class GetNic 
{
    public static Task<GetNicResult> InvokeAsync(GetNicArgs args, InvokeOptions? opts = null)
    public static Output<GetNicResult> Invoke(GetNicInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetNicResult> getNic(GetNicArgs args, InvokeOptions options)
public static Output<GetNicResult> getNic(GetNicArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: outscale:index/getNic:getNic
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Filters List<GetNicFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
Filters []GetNicFilter
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
Id string
filters List<GetNicFilter>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String
filters GetNicFilter[]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id string
filters Sequence[GetNicFilter]
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id str
filters List<Property Map>
A combination of a filter name and one or more filter values. You can specify this argument for as many filter names as you need. The filter name can be any of the following:
id String

getNic Result

The following output properties are available:

AccountId string
The account ID of the owner of the NIC.
Description string
The description of the NIC.
Id string
IsSourceDestChecked bool
(Net only) If true, the source/destination check is enabled. If false, it is disabled.
LinkNics List<GetNicLinkNic>
Information about the NIC attachment.
LinkPublicIps List<GetNicLinkPublicIp>
Information about the public IP association.
MacAddress string
The Media Access Control (MAC) address of the NIC.
NetId string
The ID of the Net for the NIC.
NicId string
The ID of the NIC.
PrivateDnsName string
The name of the private DNS.
PrivateIp string
The private IP of the NIC.
PrivateIps List<GetNicPrivateIp>
The private IPs of the NIC.
RequestId string
RequesterManaged bool
SecurityGroupIds List<string>
The ID of the security group.
SecurityGroups List<GetNicSecurityGroup>
One or more IDs of security groups for the NIC.
State string
The state of the NIC (available | attaching | in-use | detaching).
SubnetId string
The ID of the Subnet.
SubregionName string
The Subregion in which the NIC is located.
Tags List<GetNicTag>
One or more tags associated with the NIC.
Filters List<GetNicFilter>
AccountId string
The account ID of the owner of the NIC.
Description string
The description of the NIC.
Id string
IsSourceDestChecked bool
(Net only) If true, the source/destination check is enabled. If false, it is disabled.
LinkNics []GetNicLinkNic
Information about the NIC attachment.
LinkPublicIps []GetNicLinkPublicIp
Information about the public IP association.
MacAddress string
The Media Access Control (MAC) address of the NIC.
NetId string
The ID of the Net for the NIC.
NicId string
The ID of the NIC.
PrivateDnsName string
The name of the private DNS.
PrivateIp string
The private IP of the NIC.
PrivateIps []GetNicPrivateIpType
The private IPs of the NIC.
RequestId string
RequesterManaged bool
SecurityGroupIds []string
The ID of the security group.
SecurityGroups []GetNicSecurityGroup
One or more IDs of security groups for the NIC.
State string
The state of the NIC (available | attaching | in-use | detaching).
SubnetId string
The ID of the Subnet.
SubregionName string
The Subregion in which the NIC is located.
Tags []GetNicTag
One or more tags associated with the NIC.
Filters []GetNicFilter
accountId String
The account ID of the owner of the NIC.
description String
The description of the NIC.
id String
isSourceDestChecked Boolean
(Net only) If true, the source/destination check is enabled. If false, it is disabled.
linkNics List<GetNicLinkNic>
Information about the NIC attachment.
linkPublicIps List<GetNicLinkPublicIp>
Information about the public IP association.
macAddress String
The Media Access Control (MAC) address of the NIC.
netId String
The ID of the Net for the NIC.
nicId String
The ID of the NIC.
privateDnsName String
The name of the private DNS.
privateIp String
The private IP of the NIC.
privateIps List<GetNicPrivateIp>
The private IPs of the NIC.
requestId String
requesterManaged Boolean
securityGroupIds List<String>
The ID of the security group.
securityGroups List<GetNicSecurityGroup>
One or more IDs of security groups for the NIC.
state String
The state of the NIC (available | attaching | in-use | detaching).
subnetId String
The ID of the Subnet.
subregionName String
The Subregion in which the NIC is located.
tags List<GetNicTag>
One or more tags associated with the NIC.
filters List<GetNicFilter>
accountId string
The account ID of the owner of the NIC.
description string
The description of the NIC.
id string
isSourceDestChecked boolean
(Net only) If true, the source/destination check is enabled. If false, it is disabled.
linkNics GetNicLinkNic[]
Information about the NIC attachment.
linkPublicIps GetNicLinkPublicIp[]
Information about the public IP association.
macAddress string
The Media Access Control (MAC) address of the NIC.
netId string
The ID of the Net for the NIC.
nicId string
The ID of the NIC.
privateDnsName string
The name of the private DNS.
privateIp string
The private IP of the NIC.
privateIps GetNicPrivateIp[]
The private IPs of the NIC.
requestId string
requesterManaged boolean
securityGroupIds string[]
The ID of the security group.
securityGroups GetNicSecurityGroup[]
One or more IDs of security groups for the NIC.
state string
The state of the NIC (available | attaching | in-use | detaching).
subnetId string
The ID of the Subnet.
subregionName string
The Subregion in which the NIC is located.
tags GetNicTag[]
One or more tags associated with the NIC.
filters GetNicFilter[]
account_id str
The account ID of the owner of the NIC.
description str
The description of the NIC.
id str
is_source_dest_checked bool
(Net only) If true, the source/destination check is enabled. If false, it is disabled.
link_nics Sequence[GetNicLinkNic]
Information about the NIC attachment.
link_public_ips Sequence[GetNicLinkPublicIp]
Information about the public IP association.
mac_address str
The Media Access Control (MAC) address of the NIC.
net_id str
The ID of the Net for the NIC.
nic_id str
The ID of the NIC.
private_dns_name str
The name of the private DNS.
private_ip str
The private IP of the NIC.
private_ips Sequence[GetNicPrivateIp]
The private IPs of the NIC.
request_id str
requester_managed bool
security_group_ids Sequence[str]
The ID of the security group.
security_groups Sequence[GetNicSecurityGroup]
One or more IDs of security groups for the NIC.
state str
The state of the NIC (available | attaching | in-use | detaching).
subnet_id str
The ID of the Subnet.
subregion_name str
The Subregion in which the NIC is located.
tags Sequence[GetNicTag]
One or more tags associated with the NIC.
filters Sequence[GetNicFilter]
accountId String
The account ID of the owner of the NIC.
description String
The description of the NIC.
id String
isSourceDestChecked Boolean
(Net only) If true, the source/destination check is enabled. If false, it is disabled.
linkNics List<Property Map>
Information about the NIC attachment.
linkPublicIps List<Property Map>
Information about the public IP association.
macAddress String
The Media Access Control (MAC) address of the NIC.
netId String
The ID of the Net for the NIC.
nicId String
The ID of the NIC.
privateDnsName String
The name of the private DNS.
privateIp String
The private IP of the NIC.
privateIps List<Property Map>
The private IPs of the NIC.
requestId String
requesterManaged Boolean
securityGroupIds List<String>
The ID of the security group.
securityGroups List<Property Map>
One or more IDs of security groups for the NIC.
state String
The state of the NIC (available | attaching | in-use | detaching).
subnetId String
The ID of the Subnet.
subregionName String
The Subregion in which the NIC is located.
tags List<Property Map>
One or more tags associated with the NIC.
filters List<Property Map>

Supporting Types

GetNicFilter

Name This property is required. string
Values This property is required. List<string>
Name This property is required. string
Values This property is required. []string
name This property is required. String
values This property is required. List<String>
name This property is required. string
values This property is required. string[]
name This property is required. str
values This property is required. Sequence[str]
name This property is required. String
values This property is required. List<String>

GetNicLinkNic

DeleteOnVmDeletion This property is required. string
If true, the NIC is deleted when the VM is terminated.
DeviceNumber This property is required. double
The device index for the NIC attachment (between 1 and 7, both included).
LinkNicId This property is required. string
The ID of the NIC to attach.
State This property is required. string
The state of the NIC (available | attaching | in-use | detaching).
VmAccountId This property is required. string
The account ID of the owner of the VM.
VmId This property is required. string
The ID of the VM.
DeleteOnVmDeletion This property is required. string
If true, the NIC is deleted when the VM is terminated.
DeviceNumber This property is required. float64
The device index for the NIC attachment (between 1 and 7, both included).
LinkNicId This property is required. string
The ID of the NIC to attach.
State This property is required. string
The state of the NIC (available | attaching | in-use | detaching).
VmAccountId This property is required. string
The account ID of the owner of the VM.
VmId This property is required. string
The ID of the VM.
deleteOnVmDeletion This property is required. String
If true, the NIC is deleted when the VM is terminated.
deviceNumber This property is required. Double
The device index for the NIC attachment (between 1 and 7, both included).
linkNicId This property is required. String
The ID of the NIC to attach.
state This property is required. String
The state of the NIC (available | attaching | in-use | detaching).
vmAccountId This property is required. String
The account ID of the owner of the VM.
vmId This property is required. String
The ID of the VM.
deleteOnVmDeletion This property is required. string
If true, the NIC is deleted when the VM is terminated.
deviceNumber This property is required. number
The device index for the NIC attachment (between 1 and 7, both included).
linkNicId This property is required. string
The ID of the NIC to attach.
state This property is required. string
The state of the NIC (available | attaching | in-use | detaching).
vmAccountId This property is required. string
The account ID of the owner of the VM.
vmId This property is required. string
The ID of the VM.
delete_on_vm_deletion This property is required. str
If true, the NIC is deleted when the VM is terminated.
device_number This property is required. float
The device index for the NIC attachment (between 1 and 7, both included).
link_nic_id This property is required. str
The ID of the NIC to attach.
state This property is required. str
The state of the NIC (available | attaching | in-use | detaching).
vm_account_id This property is required. str
The account ID of the owner of the VM.
vm_id This property is required. str
The ID of the VM.
deleteOnVmDeletion This property is required. String
If true, the NIC is deleted when the VM is terminated.
deviceNumber This property is required. Number
The device index for the NIC attachment (between 1 and 7, both included).
linkNicId This property is required. String
The ID of the NIC to attach.
state This property is required. String
The state of the NIC (available | attaching | in-use | detaching).
vmAccountId This property is required. String
The account ID of the owner of the VM.
vmId This property is required. String
The ID of the VM.

GetNicLinkPublicIp

LinkPublicIpId This property is required. string
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
PublicDnsName This property is required. string
The name of the public DNS.
PublicIp This property is required. string
The public IP associated with the NIC.
PublicIpAccountId This property is required. string
The account ID of the owner of the public IP.
PublicIpId This property is required. string
The allocation ID of the public IP.
LinkPublicIpId This property is required. string
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
PublicDnsName This property is required. string
The name of the public DNS.
PublicIp This property is required. string
The public IP associated with the NIC.
PublicIpAccountId This property is required. string
The account ID of the owner of the public IP.
PublicIpId This property is required. string
The allocation ID of the public IP.
linkPublicIpId This property is required. String
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
publicDnsName This property is required. String
The name of the public DNS.
publicIp This property is required. String
The public IP associated with the NIC.
publicIpAccountId This property is required. String
The account ID of the owner of the public IP.
publicIpId This property is required. String
The allocation ID of the public IP.
linkPublicIpId This property is required. string
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
publicDnsName This property is required. string
The name of the public DNS.
publicIp This property is required. string
The public IP associated with the NIC.
publicIpAccountId This property is required. string
The account ID of the owner of the public IP.
publicIpId This property is required. string
The allocation ID of the public IP.
link_public_ip_id This property is required. str
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
public_dns_name This property is required. str
The name of the public DNS.
public_ip This property is required. str
The public IP associated with the NIC.
public_ip_account_id This property is required. str
The account ID of the owner of the public IP.
public_ip_id This property is required. str
The allocation ID of the public IP.
linkPublicIpId This property is required. String
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
publicDnsName This property is required. String
The name of the public DNS.
publicIp This property is required. String
The public IP associated with the NIC.
publicIpAccountId This property is required. String
The account ID of the owner of the public IP.
publicIpId This property is required. String
The allocation ID of the public IP.

GetNicPrivateIp

IsPrimary This property is required. bool
If true, the IP is the primary private IP of the NIC.
LinkPublicIps This property is required. List<GetNicPrivateIpLinkPublicIp>
Information about the public IP association.
PrivateDnsName This property is required. string
The name of the private DNS.
PrivateIp This property is required. string
The private IP of the NIC.
IsPrimary This property is required. bool
If true, the IP is the primary private IP of the NIC.
LinkPublicIps This property is required. []GetNicPrivateIpLinkPublicIp
Information about the public IP association.
PrivateDnsName This property is required. string
The name of the private DNS.
PrivateIp This property is required. string
The private IP of the NIC.
isPrimary This property is required. Boolean
If true, the IP is the primary private IP of the NIC.
linkPublicIps This property is required. List<GetNicPrivateIpLinkPublicIp>
Information about the public IP association.
privateDnsName This property is required. String
The name of the private DNS.
privateIp This property is required. String
The private IP of the NIC.
isPrimary This property is required. boolean
If true, the IP is the primary private IP of the NIC.
linkPublicIps This property is required. GetNicPrivateIpLinkPublicIp[]
Information about the public IP association.
privateDnsName This property is required. string
The name of the private DNS.
privateIp This property is required. string
The private IP of the NIC.
is_primary This property is required. bool
If true, the IP is the primary private IP of the NIC.
link_public_ips This property is required. Sequence[GetNicPrivateIpLinkPublicIp]
Information about the public IP association.
private_dns_name This property is required. str
The name of the private DNS.
private_ip This property is required. str
The private IP of the NIC.
isPrimary This property is required. Boolean
If true, the IP is the primary private IP of the NIC.
linkPublicIps This property is required. List<Property Map>
Information about the public IP association.
privateDnsName This property is required. String
The name of the private DNS.
privateIp This property is required. String
The private IP of the NIC.

GetNicPrivateIpLinkPublicIp

LinkPublicIpId This property is required. string
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
PublicDnsName This property is required. string
The name of the public DNS.
PublicIp This property is required. string
The public IP associated with the NIC.
PublicIpAccountId This property is required. string
The account ID of the owner of the public IP.
PublicIpId This property is required. string
The allocation ID of the public IP.
LinkPublicIpId This property is required. string
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
PublicDnsName This property is required. string
The name of the public DNS.
PublicIp This property is required. string
The public IP associated with the NIC.
PublicIpAccountId This property is required. string
The account ID of the owner of the public IP.
PublicIpId This property is required. string
The allocation ID of the public IP.
linkPublicIpId This property is required. String
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
publicDnsName This property is required. String
The name of the public DNS.
publicIp This property is required. String
The public IP associated with the NIC.
publicIpAccountId This property is required. String
The account ID of the owner of the public IP.
publicIpId This property is required. String
The allocation ID of the public IP.
linkPublicIpId This property is required. string
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
publicDnsName This property is required. string
The name of the public DNS.
publicIp This property is required. string
The public IP associated with the NIC.
publicIpAccountId This property is required. string
The account ID of the owner of the public IP.
publicIpId This property is required. string
The allocation ID of the public IP.
link_public_ip_id This property is required. str
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
public_dns_name This property is required. str
The name of the public DNS.
public_ip This property is required. str
The public IP associated with the NIC.
public_ip_account_id This property is required. str
The account ID of the owner of the public IP.
public_ip_id This property is required. str
The allocation ID of the public IP.
linkPublicIpId This property is required. String
(Required in a Net) The ID representing the association of the public IP with the VM or the NIC.
publicDnsName This property is required. String
The name of the public DNS.
publicIp This property is required. String
The public IP associated with the NIC.
publicIpAccountId This property is required. String
The account ID of the owner of the public IP.
publicIpId This property is required. String
The allocation ID of the public IP.

GetNicSecurityGroup

SecurityGroupId This property is required. string
The ID of the security group.
SecurityGroupName This property is required. string
The name of the security group.
SecurityGroupId This property is required. string
The ID of the security group.
SecurityGroupName This property is required. string
The name of the security group.
securityGroupId This property is required. String
The ID of the security group.
securityGroupName This property is required. String
The name of the security group.
securityGroupId This property is required. string
The ID of the security group.
securityGroupName This property is required. string
The name of the security group.
security_group_id This property is required. str
The ID of the security group.
security_group_name This property is required. str
The name of the security group.
securityGroupId This property is required. String
The ID of the security group.
securityGroupName This property is required. String
The name of the security group.

GetNicTag

Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
Key This property is required. string
The key of the tag, with a minimum of 1 character.
Value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.
key This property is required. string
The key of the tag, with a minimum of 1 character.
value This property is required. string
The value of the tag, between 0 and 255 characters.
key This property is required. str
The key of the tag, with a minimum of 1 character.
value This property is required. str
The value of the tag, between 0 and 255 characters.
key This property is required. String
The key of the tag, with a minimum of 1 character.
value This property is required. String
The value of the tag, between 0 and 255 characters.

Package Details

Repository
outscale outscale/terraform-provider-outscale
License
Notes
This Pulumi package is based on the outscale Terraform Provider.
outscale 1.1.0 published on Thursday, Apr 3, 2025 by outscale