1. Packages
  2. Equinix Metal (Deprecated)
  3. API Docs
  4. getPort

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED

equinix-metal.getPort

Explore with Pulumi AI

equinix-metal logo

This package is deprecated. We recommend using the new Equinix package.

Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED

    Use this data source to read ports of existing devices. You can read port by either its UUID, or by a device UUID and port name.

    Example Usage

    Create a device and read it's eth0 port to the datasource.

    using Pulumi;
    using EquinixMetal = Pulumi.EquinixMetal;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var projectId = "<UUID_of_your_project>";
            var testDevice = new EquinixMetal.Device("testDevice", new EquinixMetal.DeviceArgs
            {
                Hostname = "tfacc-test-device-port",
                Plan = "c3.medium.x86",
                Facilities = 
                {
                    "sv15",
                },
                OperatingSystem = "ubuntu_20_04",
                BillingCycle = "hourly",
                ProjectId = projectId,
            });
            var testPort = testDevice.Id.Apply(id => EquinixMetal.GetPort.InvokeAsync(new EquinixMetal.GetPortArgs
            {
                DeviceId = id,
                Name = "eth0",
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-equinix-metal/sdk/v3/go/equinix-metal"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		projectId := "<UUID_of_your_project>"
    		testDevice, err := equinix - metal.NewDevice(ctx, "testDevice", &equinix-metal.DeviceArgs{
    			Hostname: pulumi.String("tfacc-test-device-port"),
    			Plan:     pulumi.String("c3.medium.x86"),
    			Facilities: pulumi.StringArray{
    				pulumi.String("sv15"),
    			},
    			OperatingSystem: pulumi.String("ubuntu_20_04"),
    			BillingCycle:    pulumi.String("hourly"),
    			ProjectId:       pulumi.String(projectId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_equinix_metal as equinix_metal
    
    project_id = "<UUID_of_your_project>"
    test_device = equinix_metal.Device("testDevice",
        hostname="tfacc-test-device-port",
        plan="c3.medium.x86",
        facilities=["sv15"],
        operating_system="ubuntu_20_04",
        billing_cycle="hourly",
        project_id=project_id)
    test_port = test_device.id.apply(lambda id: equinix_metal.get_port(device_id=id,
        name="eth0"))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as equinix_metal from "@pulumi/equinix-metal";
    
    const projectId = "<UUID_of_your_project>";
    const testDevice = new equinix_metal.Device("testDevice", {
        hostname: "tfacc-test-device-port",
        plan: "c3.medium.x86",
        facilities: ["sv15"],
        operatingSystem: "ubuntu_20_04",
        billingCycle: "hourly",
        projectId: projectId,
    });
    const testPort = testDevice.id.apply(id => equinix_metal.getPort({
        deviceId: id,
        name: "eth0",
    }));
    

    Coming soon!

    Using getPort

    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 getPort(args: GetPortArgs, opts?: InvokeOptions): Promise<GetPortResult>
    function getPortOutput(args: GetPortOutputArgs, opts?: InvokeOptions): Output<GetPortResult>
    def get_port(device_id: Optional[str] = None,
                 name: Optional[str] = None,
                 port_id: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetPortResult
    def get_port_output(device_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 port_id: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetPortResult]
    func LookupPort(ctx *Context, args *LookupPortArgs, opts ...InvokeOption) (*LookupPortResult, error)
    func LookupPortOutput(ctx *Context, args *LookupPortOutputArgs, opts ...InvokeOption) LookupPortResultOutput

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

    public static class GetPort 
    {
        public static Task<GetPortResult> InvokeAsync(GetPortArgs args, InvokeOptions? opts = null)
        public static Output<GetPortResult> Invoke(GetPortInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetPortResult> getPort(GetPortArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: equinix-metal:index/getPort:getPort
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DeviceId string
    Name string
    Whether to look for public or private block.
    PortId string
    DeviceId string
    Name string
    Whether to look for public or private block.
    PortId string
    deviceId String
    name String
    Whether to look for public or private block.
    portId String
    deviceId string
    name string
    Whether to look for public or private block.
    portId string
    device_id str
    name str
    Whether to look for public or private block.
    port_id str
    deviceId String
    name String
    Whether to look for public or private block.
    portId String

    getPort Result

    The following output properties are available:

    BondId string
    UUID of the bond port"
    BondName string
    Name of the bond port
    Bonded bool
    Flag indicating whether the port is bonded
    DisbondSupported bool
    Flag indicating whether the port can be removed from a bond
    Id string
    The provider-assigned unique ID for this managed resource.
    Layer2 bool
    Mac string
    MAC address of the port
    Name string
    NativeVlanId string
    UUID of native VLAN of the port
    NetworkType string
    One of layer2-bonded, layer2-individual, layer3, hybrid, hybrid-bonded
    Type string
    Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports
    VlanIds List<string>
    UUIDs of attached VLANs
    VxlanIds List<int>
    VXLAN ids of attached VLANs
    DeviceId string
    PortId string
    BondId string
    UUID of the bond port"
    BondName string
    Name of the bond port
    Bonded bool
    Flag indicating whether the port is bonded
    DisbondSupported bool
    Flag indicating whether the port can be removed from a bond
    Id string
    The provider-assigned unique ID for this managed resource.
    Layer2 bool
    Mac string
    MAC address of the port
    Name string
    NativeVlanId string
    UUID of native VLAN of the port
    NetworkType string
    One of layer2-bonded, layer2-individual, layer3, hybrid, hybrid-bonded
    Type string
    Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports
    VlanIds []string
    UUIDs of attached VLANs
    VxlanIds []int
    VXLAN ids of attached VLANs
    DeviceId string
    PortId string
    bondId String
    UUID of the bond port"
    bondName String
    Name of the bond port
    bonded Boolean
    Flag indicating whether the port is bonded
    disbondSupported Boolean
    Flag indicating whether the port can be removed from a bond
    id String
    The provider-assigned unique ID for this managed resource.
    layer2 Boolean
    mac String
    MAC address of the port
    name String
    nativeVlanId String
    UUID of native VLAN of the port
    networkType String
    One of layer2-bonded, layer2-individual, layer3, hybrid, hybrid-bonded
    type String
    Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports
    vlanIds List<String>
    UUIDs of attached VLANs
    vxlanIds List<Integer>
    VXLAN ids of attached VLANs
    deviceId String
    portId String
    bondId string
    UUID of the bond port"
    bondName string
    Name of the bond port
    bonded boolean
    Flag indicating whether the port is bonded
    disbondSupported boolean
    Flag indicating whether the port can be removed from a bond
    id string
    The provider-assigned unique ID for this managed resource.
    layer2 boolean
    mac string
    MAC address of the port
    name string
    nativeVlanId string
    UUID of native VLAN of the port
    networkType string
    One of layer2-bonded, layer2-individual, layer3, hybrid, hybrid-bonded
    type string
    Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports
    vlanIds string[]
    UUIDs of attached VLANs
    vxlanIds number[]
    VXLAN ids of attached VLANs
    deviceId string
    portId string
    bond_id str
    UUID of the bond port"
    bond_name str
    Name of the bond port
    bonded bool
    Flag indicating whether the port is bonded
    disbond_supported bool
    Flag indicating whether the port can be removed from a bond
    id str
    The provider-assigned unique ID for this managed resource.
    layer2 bool
    mac str
    MAC address of the port
    name str
    native_vlan_id str
    UUID of native VLAN of the port
    network_type str
    One of layer2-bonded, layer2-individual, layer3, hybrid, hybrid-bonded
    type str
    Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports
    vlan_ids Sequence[str]
    UUIDs of attached VLANs
    vxlan_ids Sequence[int]
    VXLAN ids of attached VLANs
    device_id str
    port_id str
    bondId String
    UUID of the bond port"
    bondName String
    Name of the bond port
    bonded Boolean
    Flag indicating whether the port is bonded
    disbondSupported Boolean
    Flag indicating whether the port can be removed from a bond
    id String
    The provider-assigned unique ID for this managed resource.
    layer2 Boolean
    mac String
    MAC address of the port
    name String
    nativeVlanId String
    UUID of native VLAN of the port
    networkType String
    One of layer2-bonded, layer2-individual, layer3, hybrid, hybrid-bonded
    type String
    Type is either "NetworkBondPort" for bond ports or "NetworkPort" for bondable ethernet ports
    vlanIds List<String>
    UUIDs of attached VLANs
    vxlanIds List<Number>
    VXLAN ids of attached VLANs
    deviceId String
    portId String

    Package Details

    Repository
    Equinix Metal pulumi/pulumi-equinix-metal
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the metal Terraform Provider.
    equinix-metal logo

    This package is deprecated. We recommend using the new Equinix package.

    Equinix Metal v3.2.1 published on Thursday, Dec 30, 2021 by DEPRECATED