Equinix v0.11.2 published on Wednesday, Jun 26, 2024 by Equinix
equinix.fabric.getPort
Explore with Pulumi AI
Fabric V4 API compatible data resource that allow user to fetch port by uuid
Additional documentation:
- Getting Started: https://docs.equinix.com/en-us/Content/Interconnection/Fabric/IMPLEMENTATION/fabric-ports-implement.htm
- API: https://developer.equinix.com/dev-docs/fabric/api-reference/fabric-v4-apis#ports
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as equinix from "@pulumi/equinix";
const portDataName = equinix.fabric.getPort({
uuid: "<uuid_of_port>",
});
export const id = portDataName.then(portDataName => portDataName.id);
export const name = portDataName.then(portDataName => portDataName.name);
export const state = portDataName.then(portDataName => portDataName.state);
export const accountName = portDataName.then(portDataName => portDataName.account?.accountName);
export const type = portDataName.then(portDataName => portDataName.type);
export const bandwidth = portDataName.then(portDataName => portDataName.bandwidth);
export const usedBandwidth = portDataName.then(portDataName => portDataName.usedBandwidth);
export const encapsulationType = portDataName.then(portDataName => portDataName.encapsulation?.type);
export const ibx = portDataName.then(portDataName => portDataName.location?.ibx);
export const metroCode = portDataName.then(portDataName => portDataName.location?.metroCode);
export const metroName = portDataName.then(portDataName => portDataName.location?.metroName);
export const region = portDataName.then(portDataName => portDataName.location?.region);
export const deviceRedundancyEnabled = portDataName.then(portDataName => portDataName.device?.redundancies?.[0]?.enabled);
export const deviceRedundancyPriority = portDataName.then(portDataName => portDataName.device?.redundancies?.[0]?.priority);
import pulumi
import pulumi_equinix as equinix
port_data_name = equinix.fabric.get_port(uuid="<uuid_of_port>")
pulumi.export("id", port_data_name.id)
pulumi.export("name", port_data_name.name)
pulumi.export("state", port_data_name.state)
pulumi.export("accountName", port_data_name.account.account_name)
pulumi.export("type", port_data_name.type)
pulumi.export("bandwidth", port_data_name.bandwidth)
pulumi.export("usedBandwidth", port_data_name.used_bandwidth)
pulumi.export("encapsulationType", port_data_name.encapsulation.type)
pulumi.export("ibx", port_data_name.location.ibx)
pulumi.export("metroCode", port_data_name.location.metro_code)
pulumi.export("metroName", port_data_name.location.metro_name)
pulumi.export("region", port_data_name.location.region)
pulumi.export("deviceRedundancyEnabled", port_data_name.device.redundancies[0].enabled)
pulumi.export("deviceRedundancyPriority", port_data_name.device.redundancies[0].priority)
package main
import (
"github.com/equinix/pulumi-equinix/sdk/go/equinix/fabric"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
portDataName, err := fabric.GetPort(ctx, &fabric.GetPortArgs{
Uuid: "<uuid_of_port>",
}, nil)
if err != nil {
return err
}
ctx.Export("id", portDataName.Id)
ctx.Export("name", portDataName.Name)
ctx.Export("state", portDataName.State)
ctx.Export("accountName", portDataName.Account.AccountName)
ctx.Export("type", portDataName.Type)
ctx.Export("bandwidth", portDataName.Bandwidth)
ctx.Export("usedBandwidth", portDataName.UsedBandwidth)
ctx.Export("encapsulationType", portDataName.Encapsulation.Type)
ctx.Export("ibx", portDataName.Location.Ibx)
ctx.Export("metroCode", portDataName.Location.MetroCode)
ctx.Export("metroName", portDataName.Location.MetroName)
ctx.Export("region", portDataName.Location.Region)
ctx.Export("deviceRedundancyEnabled", portDataName.Device.Redundancies[0].Enabled)
ctx.Export("deviceRedundancyPriority", portDataName.Device.Redundancies[0].Priority)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Equinix = Pulumi.Equinix;
return await Deployment.RunAsync(() =>
{
var portDataName = Equinix.Fabric.GetPort.Invoke(new()
{
Uuid = "<uuid_of_port>",
});
return new Dictionary<string, object?>
{
["id"] = portDataName.Apply(getPortResult => getPortResult.Id),
["name"] = portDataName.Apply(getPortResult => getPortResult.Name),
["state"] = portDataName.Apply(getPortResult => getPortResult.State),
["accountName"] = portDataName.Apply(getPortResult => getPortResult.Account?.AccountName),
["type"] = portDataName.Apply(getPortResult => getPortResult.Type),
["bandwidth"] = portDataName.Apply(getPortResult => getPortResult.Bandwidth),
["usedBandwidth"] = portDataName.Apply(getPortResult => getPortResult.UsedBandwidth),
["encapsulationType"] = portDataName.Apply(getPortResult => getPortResult.Encapsulation?.Type),
["ibx"] = portDataName.Apply(getPortResult => getPortResult.Location?.Ibx),
["metroCode"] = portDataName.Apply(getPortResult => getPortResult.Location?.MetroCode),
["metroName"] = portDataName.Apply(getPortResult => getPortResult.Location?.MetroName),
["region"] = portDataName.Apply(getPortResult => getPortResult.Location?.Region),
["deviceRedundancyEnabled"] = portDataName.Apply(getPortResult => getPortResult.Device?.Redundancies[0]?.Enabled),
["deviceRedundancyPriority"] = portDataName.Apply(getPortResult => getPortResult.Device?.Redundancies[0]?.Priority),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.equinix.fabric.FabricFunctions;
import com.pulumi.equinix.fabric.inputs.GetPortArgs;
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 portDataName = FabricFunctions.getPort(GetPortArgs.builder()
.uuid("<uuid_of_port>")
.build());
ctx.export("id", portDataName.applyValue(getPortResult -> getPortResult.id()));
ctx.export("name", portDataName.applyValue(getPortResult -> getPortResult.name()));
ctx.export("state", portDataName.applyValue(getPortResult -> getPortResult.state()));
ctx.export("accountName", portDataName.applyValue(getPortResult -> getPortResult.account().accountName()));
ctx.export("type", portDataName.applyValue(getPortResult -> getPortResult.type()));
ctx.export("bandwidth", portDataName.applyValue(getPortResult -> getPortResult.bandwidth()));
ctx.export("usedBandwidth", portDataName.applyValue(getPortResult -> getPortResult.usedBandwidth()));
ctx.export("encapsulationType", portDataName.applyValue(getPortResult -> getPortResult.encapsulation().type()));
ctx.export("ibx", portDataName.applyValue(getPortResult -> getPortResult.location().ibx()));
ctx.export("metroCode", portDataName.applyValue(getPortResult -> getPortResult.location().metroCode()));
ctx.export("metroName", portDataName.applyValue(getPortResult -> getPortResult.location().metroName()));
ctx.export("region", portDataName.applyValue(getPortResult -> getPortResult.location().region()));
ctx.export("deviceRedundancyEnabled", portDataName.applyValue(getPortResult -> getPortResult.device().redundancies()[0].enabled()));
ctx.export("deviceRedundancyPriority", portDataName.applyValue(getPortResult -> getPortResult.device().redundancies()[0].priority()));
}
}
variables:
portDataName:
fn::invoke:
Function: equinix:fabric:getPort
Arguments:
uuid: <uuid_of_port>
outputs:
id: ${portDataName.id}
name: ${portDataName.name}
state: ${portDataName.state}
accountName: ${portDataName.account.accountName}
type: ${portDataName.type}
bandwidth: ${portDataName.bandwidth}
usedBandwidth: ${portDataName.usedBandwidth}
encapsulationType: ${portDataName.encapsulation.type}
ibx: ${portDataName.location.ibx}
metroCode: ${portDataName.location.metroCode}
metroName: ${portDataName.location.metroName}
region: ${portDataName.location.region}
deviceRedundancyEnabled: ${portDataName.device.redundancies[0].enabled}
deviceRedundancyPriority: ${portDataName.device.redundancies[0].priority}
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(uuid: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPortResult
def get_port_output(uuid: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetPortResult]
func GetPort(ctx *Context, args *GetPortArgs, opts ...InvokeOption) (*GetPortResult, error)
func GetPortOutput(ctx *Context, args *GetPortOutputArgs, opts ...InvokeOption) GetPortResultOutput
> Note: This function is named GetPort
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:fabric/getPort:getPort
arguments:
# arguments dictionary
The following arguments are supported:
- Uuid string
- Equinix-assigned port identifier
- Uuid string
- Equinix-assigned port identifier
- uuid String
- Equinix-assigned port identifier
- uuid string
- Equinix-assigned port identifier
- uuid str
- Equinix-assigned port identifier
- uuid String
- Equinix-assigned port identifier
getPort Result
The following output properties are available:
- Account
Get
Port Account - Customer account information that is associated with this port
- Available
Bandwidth int - Port available bandwidth in Mbps
- Bandwidth int
- Port bandwidth in Mbps
- Change
Log GetPort Change Log - Captures port lifecycle change information
- Description string
- Port description
- Device
Get
Port Device - Port device
- Encapsulation
Get
Port Encapsulation - Port encapsulation protocol
- Href string
- Port URI information
- Id string
- The provider-assigned unique ID for this managed resource.
- Lag
Enabled bool - Port Lag
- Location
Get
Port Location - Port location information
- Name string
- Port name
- Operation
Get
Port Operation - Port specific operational data
- Redundancy
Get
Port Redundancy - Port redundancy information
- Service
Type string - Port service type
- State string
- Port state
- Type string
- Port type
- Used
Bandwidth int - Port used bandwidth in Mbps
- Uuid string
- Equinix-assigned port identifier
- Account
Get
Port Account - Customer account information that is associated with this port
- Available
Bandwidth int - Port available bandwidth in Mbps
- Bandwidth int
- Port bandwidth in Mbps
- Change
Log GetPort Change Log - Captures port lifecycle change information
- Description string
- Port description
- Device
Get
Port Device - Port device
- Encapsulation
Get
Port Encapsulation - Port encapsulation protocol
- Href string
- Port URI information
- Id string
- The provider-assigned unique ID for this managed resource.
- Lag
Enabled bool - Port Lag
- Location
Get
Port Location - Port location information
- Name string
- Port name
- Operation
Get
Port Operation - Port specific operational data
- Redundancy
Get
Port Redundancy - Port redundancy information
- Service
Type string - Port service type
- State string
- Port state
- Type string
- Port type
- Used
Bandwidth int - Port used bandwidth in Mbps
- Uuid string
- Equinix-assigned port identifier
- account
Get
Port Account - Customer account information that is associated with this port
- available
Bandwidth Integer - Port available bandwidth in Mbps
- bandwidth Integer
- Port bandwidth in Mbps
- change
Log GetPort Change Log - Captures port lifecycle change information
- description String
- Port description
- device
Get
Port Device - Port device
- encapsulation
Get
Port Encapsulation - Port encapsulation protocol
- href String
- Port URI information
- id String
- The provider-assigned unique ID for this managed resource.
- lag
Enabled Boolean - Port Lag
- location
Get
Port Location - Port location information
- name String
- Port name
- operation
Get
Port Operation - Port specific operational data
- redundancy
Get
Port Redundancy - Port redundancy information
- service
Type String - Port service type
- state String
- Port state
- type String
- Port type
- used
Bandwidth Integer - Port used bandwidth in Mbps
- uuid String
- Equinix-assigned port identifier
- account
Get
Port Account - Customer account information that is associated with this port
- available
Bandwidth number - Port available bandwidth in Mbps
- bandwidth number
- Port bandwidth in Mbps
- change
Log GetPort Change Log - Captures port lifecycle change information
- description string
- Port description
- device
Get
Port Device - Port device
- encapsulation
Get
Port Encapsulation - Port encapsulation protocol
- href string
- Port URI information
- id string
- The provider-assigned unique ID for this managed resource.
- lag
Enabled boolean - Port Lag
- location
Get
Port Location - Port location information
- name string
- Port name
- operation
Get
Port Operation - Port specific operational data
- redundancy
Get
Port Redundancy - Port redundancy information
- service
Type string - Port service type
- state string
- Port state
- type string
- Port type
- used
Bandwidth number - Port used bandwidth in Mbps
- uuid string
- Equinix-assigned port identifier
- account
Get
Port Account - Customer account information that is associated with this port
- available_
bandwidth int - Port available bandwidth in Mbps
- bandwidth int
- Port bandwidth in Mbps
- change_
log GetPort Change Log - Captures port lifecycle change information
- description str
- Port description
- device
Get
Port Device - Port device
- encapsulation
Get
Port Encapsulation - Port encapsulation protocol
- href str
- Port URI information
- id str
- The provider-assigned unique ID for this managed resource.
- lag_
enabled bool - Port Lag
- location
Get
Port Location - Port location information
- name str
- Port name
- operation
Get
Port Operation - Port specific operational data
- redundancy
Get
Port Redundancy - Port redundancy information
- service_
type str - Port service type
- state str
- Port state
- type str
- Port type
- used_
bandwidth int - Port used bandwidth in Mbps
- uuid str
- Equinix-assigned port identifier
- account Property Map
- Customer account information that is associated with this port
- available
Bandwidth Number - Port available bandwidth in Mbps
- bandwidth Number
- Port bandwidth in Mbps
- change
Log Property Map - Captures port lifecycle change information
- description String
- Port description
- device Property Map
- Port device
- encapsulation Property Map
- Port encapsulation protocol
- href String
- Port URI information
- id String
- The provider-assigned unique ID for this managed resource.
- lag
Enabled Boolean - Port Lag
- location Property Map
- Port location information
- name String
- Port name
- operation Property Map
- Port specific operational data
- redundancy Property Map
- Port redundancy information
- service
Type String - Port service type
- state String
- Port state
- type String
- Port type
- used
Bandwidth Number - Port used bandwidth in Mbps
- uuid String
- Equinix-assigned port identifier
Supporting Types
GetPortAccount
- Account
Name string - Legal name of the accountholder.
- Account
Number int - Equinix-assigned account number.
- Global
Cust stringId - Equinix-assigned ID of the subscriber's parent organization.
- Global
Org stringId - Equinix-assigned ID of the subscriber's parent organization.
- Global
Organization stringName - Equinix-assigned name of the subscriber's parent organization.
- Org
Id int - Equinix-assigned ID of the subscriber's organization.
- Organization
Name string - Equinix-assigned name of the subscriber's organization.
- Ucm
Id string - Enterprise datastore id
- Account
Name string - Legal name of the accountholder.
- Account
Number int - Equinix-assigned account number.
- Global
Cust stringId - Equinix-assigned ID of the subscriber's parent organization.
- Global
Org stringId - Equinix-assigned ID of the subscriber's parent organization.
- Global
Organization stringName - Equinix-assigned name of the subscriber's parent organization.
- Org
Id int - Equinix-assigned ID of the subscriber's organization.
- Organization
Name string - Equinix-assigned name of the subscriber's organization.
- Ucm
Id string - Enterprise datastore id
- account
Name String - Legal name of the accountholder.
- account
Number Integer - Equinix-assigned account number.
- global
Cust StringId - Equinix-assigned ID of the subscriber's parent organization.
- global
Org StringId - Equinix-assigned ID of the subscriber's parent organization.
- global
Organization StringName - Equinix-assigned name of the subscriber's parent organization.
- org
Id Integer - Equinix-assigned ID of the subscriber's organization.
- organization
Name String - Equinix-assigned name of the subscriber's organization.
- ucm
Id String - Enterprise datastore id
- account
Name string - Legal name of the accountholder.
- account
Number number - Equinix-assigned account number.
- global
Cust stringId - Equinix-assigned ID of the subscriber's parent organization.
- global
Org stringId - Equinix-assigned ID of the subscriber's parent organization.
- global
Organization stringName - Equinix-assigned name of the subscriber's parent organization.
- org
Id number - Equinix-assigned ID of the subscriber's organization.
- organization
Name string - Equinix-assigned name of the subscriber's organization.
- ucm
Id string - Enterprise datastore id
- account_
name str - Legal name of the accountholder.
- account_
number int - Equinix-assigned account number.
- global_
cust_ strid - Equinix-assigned ID of the subscriber's parent organization.
- global_
org_ strid - Equinix-assigned ID of the subscriber's parent organization.
- global_
organization_ strname - Equinix-assigned name of the subscriber's parent organization.
- org_
id int - Equinix-assigned ID of the subscriber's organization.
- organization_
name str - Equinix-assigned name of the subscriber's organization.
- ucm_
id str - Enterprise datastore id
- account
Name String - Legal name of the accountholder.
- account
Number Number - Equinix-assigned account number.
- global
Cust StringId - Equinix-assigned ID of the subscriber's parent organization.
- global
Org StringId - Equinix-assigned ID of the subscriber's parent organization.
- global
Organization StringName - Equinix-assigned name of the subscriber's parent organization.
- org
Id Number - Equinix-assigned ID of the subscriber's organization.
- organization
Name String - Equinix-assigned name of the subscriber's organization.
- ucm
Id String - Enterprise datastore id
GetPortChangeLog
- Created
By string - Created by User Key
- Created
By stringEmail - Created by User Email Address
- Created
By stringFull Name - Created by User Full Name
- Created
Date stringTime - Created by Date and Time
- Deleted
By string - Deleted by User Key
- Deleted
By stringEmail - Deleted by User Email Address
- Deleted
By stringFull Name - Deleted by User Full Name
- Deleted
Date stringTime - Deleted by Date and Time
- Updated
By string - Updated by User Key
- Updated
By stringEmail - Updated by User Email Address
- Updated
By stringFull Name - Updated by User Full Name
- Updated
Date stringTime - Updated by Date and Time
- Created
By string - Created by User Key
- Created
By stringEmail - Created by User Email Address
- Created
By stringFull Name - Created by User Full Name
- Created
Date stringTime - Created by Date and Time
- Deleted
By string - Deleted by User Key
- Deleted
By stringEmail - Deleted by User Email Address
- Deleted
By stringFull Name - Deleted by User Full Name
- Deleted
Date stringTime - Deleted by Date and Time
- Updated
By string - Updated by User Key
- Updated
By stringEmail - Updated by User Email Address
- Updated
By stringFull Name - Updated by User Full Name
- Updated
Date stringTime - Updated by Date and Time
- created
By String - Created by User Key
- created
By StringEmail - Created by User Email Address
- created
By StringFull Name - Created by User Full Name
- created
Date StringTime - Created by Date and Time
- deleted
By String - Deleted by User Key
- deleted
By StringEmail - Deleted by User Email Address
- deleted
By StringFull Name - Deleted by User Full Name
- deleted
Date StringTime - Deleted by Date and Time
- updated
By String - Updated by User Key
- updated
By StringEmail - Updated by User Email Address
- updated
By StringFull Name - Updated by User Full Name
- updated
Date StringTime - Updated by Date and Time
- created
By string - Created by User Key
- created
By stringEmail - Created by User Email Address
- created
By stringFull Name - Created by User Full Name
- created
Date stringTime - Created by Date and Time
- deleted
By string - Deleted by User Key
- deleted
By stringEmail - Deleted by User Email Address
- deleted
By stringFull Name - Deleted by User Full Name
- deleted
Date stringTime - Deleted by Date and Time
- updated
By string - Updated by User Key
- updated
By stringEmail - Updated by User Email Address
- updated
By stringFull Name - Updated by User Full Name
- updated
Date stringTime - Updated by Date and Time
- created_
by str - Created by User Key
- created_
by_ stremail - Created by User Email Address
- created_
by_ strfull_ name - Created by User Full Name
- created_
date_ strtime - Created by Date and Time
- deleted_
by str - Deleted by User Key
- deleted_
by_ stremail - Deleted by User Email Address
- deleted_
by_ strfull_ name - Deleted by User Full Name
- deleted_
date_ strtime - Deleted by Date and Time
- updated_
by str - Updated by User Key
- updated_
by_ stremail - Updated by User Email Address
- updated_
by_ strfull_ name - Updated by User Full Name
- updated_
date_ strtime - Updated by Date and Time
- created
By String - Created by User Key
- created
By StringEmail - Created by User Email Address
- created
By StringFull Name - Created by User Full Name
- created
Date StringTime - Created by Date and Time
- deleted
By String - Deleted by User Key
- deleted
By StringEmail - Deleted by User Email Address
- deleted
By StringFull Name - Deleted by User Full Name
- deleted
Date StringTime - Deleted by Date and Time
- updated
By String - Updated by User Key
- updated
By StringEmail - Updated by User Email Address
- updated
By StringFull Name - Updated by User Full Name
- updated
Date StringTime - Updated by Date and Time
GetPortDevice
- Name string
- Port name
- Redundancies
List<Get
Port Device Redundancy> - Port device redundancy
- Name string
- Port name
- Redundancies
[]Get
Port Device Redundancy - Port device redundancy
- name String
- Port name
- redundancies
List<Get
Port Device Redundancy> - Port device redundancy
- name string
- Port name
- redundancies
Get
Port Device Redundancy[] - Port device redundancy
- name str
- Port name
- redundancies
Sequence[Get
Port Device Redundancy] - Port device redundancy
- name String
- Port name
- redundancies List<Property Map>
- Port device redundancy
GetPortDeviceRedundancy
GetPortEncapsulation
- Tag
Protocol stringId - Port encapsulation Tag Protocol Identifier
- Type string
- Port encapsulation protocol type
- Tag
Protocol stringId - Port encapsulation Tag Protocol Identifier
- Type string
- Port encapsulation protocol type
- tag
Protocol StringId - Port encapsulation Tag Protocol Identifier
- type String
- Port encapsulation protocol type
- tag
Protocol stringId - Port encapsulation Tag Protocol Identifier
- type string
- Port encapsulation protocol type
- tag_
protocol_ strid - Port encapsulation Tag Protocol Identifier
- type str
- Port encapsulation protocol type
- tag
Protocol StringId - Port encapsulation Tag Protocol Identifier
- type String
- Port encapsulation protocol type
GetPortLocation
- ibx str
- IBX Code
- metro_
code str - Access point metro code
- metro_
name str - Access point metro name
- region str
- Access point region
GetPortOperation
- Connection
Count int - Total number of current connections
- Op
Status stringChanged At - Date and time at which port availability changed
- Operational
Status string - Port operation status
- Connection
Count int - Total number of current connections
- Op
Status stringChanged At - Date and time at which port availability changed
- Operational
Status string - Port operation status
- connection
Count Integer - Total number of current connections
- op
Status StringChanged At - Date and time at which port availability changed
- operational
Status String - Port operation status
- connection
Count number - Total number of current connections
- op
Status stringChanged At - Date and time at which port availability changed
- operational
Status string - Port operation status
- connection_
count int - Total number of current connections
- op_
status_ strchanged_ at - Date and time at which port availability changed
- operational_
status str - Port operation status
- connection
Count Number - Total number of current connections
- op
Status StringChanged At - Date and time at which port availability changed
- operational
Status String - Port operation status
GetPortRedundancy
Package Details
- Repository
- equinix equinix/pulumi-equinix
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
equinix
Terraform Provider.