Viewing docs for megaport 1.19.1
published on Monday, Sep 28, 2026 by megaport
published on Monday, Sep 28, 2026 by megaport
Viewing docs for megaport 1.19.1
published on Monday, Sep 28, 2026 by megaport
published on Monday, Sep 28, 2026 by megaport
Looks up ports in the Megaport API. Optionally filter by product_uid to retrieve a specific port.
Using getPorts
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 getPorts(args: GetPortsArgs, opts?: InvokeOptions): Promise<GetPortsResult>
function getPortsOutput(args: GetPortsOutputArgs, opts?: InvokeOutputOptions): Output<GetPortsResult>def get_ports(include_resource_tags: Optional[bool] = None,
product_uid: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetPortsResult
def get_ports_output(include_resource_tags: pulumi.Input[Optional[bool]] = None,
product_uid: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetPortsResult]func GetPorts(ctx *Context, args *GetPortsArgs, opts ...InvokeOption) (*GetPortsResult, error)
func GetPortsOutput(ctx *Context, args *GetPortsOutputArgs, opts ...InvokeOption) GetPortsResultOutput> Note: This function is named GetPorts in the Go SDK.
public static class GetPorts
{
public static Task<GetPortsResult> InvokeAsync(GetPortsArgs args, InvokeOptions? opts = null)
public static Output<GetPortsResult> Invoke(GetPortsInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetPortsResult> Invoke(GetPortsInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetPortsResult> getPorts(GetPortsArgs args, InvokeOptions options)
public static Output<GetPortsResult> getPorts(GetPortsArgs args, InvokeOptions options)
public static Output<GetPortsResult> getPorts(GetPortsArgs args, InvokeOutputOptions options)
fn::invoke:
function: megaport:index/getPorts:getPorts
arguments:
# arguments dictionarydata "megaport_get_ports" "name" {
# arguments
}The following arguments are supported:
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- Product
Uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- Product
Uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product_
uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- Boolean
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product
Uid String - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- boolean
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product
Uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product_
uid str - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- Boolean
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product
Uid String - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
getPorts Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ports
List<Get
Ports Port> - List of ports with detailed information.
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- Product
Uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ports
[]Get
Ports Port - List of ports with detailed information.
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- Product
Uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- id string
- The provider-assigned unique ID for this managed resource.
- ports list(object)
- List of ports with detailed information.
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product_
uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- id String
- The provider-assigned unique ID for this managed resource.
- ports
List<Get
Ports Port> - List of ports with detailed information.
- Boolean
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product
Uid String - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- id string
- The provider-assigned unique ID for this managed resource.
- ports
Get
Ports Port[] - List of ports with detailed information.
- boolean
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product
Uid string - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- id str
- The provider-assigned unique ID for this managed resource.
- ports
Sequence[Get
Ports Port] - List of ports with detailed information.
- bool
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product_
uid str - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
- id String
- The provider-assigned unique ID for this managed resource.
- ports List<Property Map>
- List of ports with detailed information.
- Boolean
- Whether to fetch resource tags for each port. Enabling this causes an additional API call per port, which may be slow for accounts with many ports.
- product
Uid String - The unique identifier of a specific port to look up. If not provided, all active ports are returned.
Supporting Types
GetPortsPort
- Admin
Locked bool - Whether the port is admin locked.
- Aggregation
Id double - Numeric ID of the LAG aggregation this port belongs to. Zero if the port is not part of a LAG.
- Cancelable bool
- Whether the port can be cancelled.
- Company
Name string - The name of the company that owns the port.
- Company
Uid string - The Megaport Company UID of the port owner.
- Contract
End stringDate - The contract end date of the port.
- Contract
Start stringDate - The contract start date of the port.
- Contract
Term doubleMonths - The contract term of the port in months.
- Cost
Centre string - The cost centre of the port for billing purposes.
- Create
Date string - The date the port was created.
- Created
By string - The user who created the port.
- Diversity
Zone string - The diversity zone of the port.
- Lag
Count double - The number of ports in the LAG. Zero if the port is not part of a LAG.
- Lag
Id double - Numeric ID of the LAG this port belongs to. Zero if the port is not part of a LAG.
- Lag
Port List<string>Uids - The unique identifiers of the ports in the LAG. Null if the port is not part of a LAG.
- Lag
Primary bool - Whether the port is a LAG primary.
- Live
Date string - The date the port went live.
- Location
Id double - The numeric location ID of the port.
- Locked bool
- Whether the port is locked.
- Market string
- The market the port is in.
- Marketplace
Visibility bool - Whether the port is visible in the Marketplace.
- Port
Speed double - The bandwidth speed of the port in Mbps.
- Product
Name string - The name of the port.
- Product
Uid string - The unique identifier of the port.
- Provisioning
Status string - The provisioning status of the port.
- Dictionary<string, string>
- The resource tags associated with the port. Only populated when includeresourcetags is set to true; null otherwise (including when the port has no tags).
- Secondary
Name string - The secondary name of the port.
- Terminate
Date string - The date the port will be terminated.
- Vxc
Auto boolApproval - Whether VXC connections are auto-approved on this port.
- Vxc
Permitted bool - Whether VXC connections are permitted on this port.
- Admin
Locked bool - Whether the port is admin locked.
- Aggregation
Id float64 - Numeric ID of the LAG aggregation this port belongs to. Zero if the port is not part of a LAG.
- Cancelable bool
- Whether the port can be cancelled.
- Company
Name string - The name of the company that owns the port.
- Company
Uid string - The Megaport Company UID of the port owner.
- Contract
End stringDate - The contract end date of the port.
- Contract
Start stringDate - The contract start date of the port.
- Contract
Term float64Months - The contract term of the port in months.
- Cost
Centre string - The cost centre of the port for billing purposes.
- Create
Date string - The date the port was created.
- Created
By string - The user who created the port.
- Diversity
Zone string - The diversity zone of the port.
- Lag
Count float64 - The number of ports in the LAG. Zero if the port is not part of a LAG.
- Lag
Id float64 - Numeric ID of the LAG this port belongs to. Zero if the port is not part of a LAG.
- Lag
Port []stringUids - The unique identifiers of the ports in the LAG. Null if the port is not part of a LAG.
- Lag
Primary bool - Whether the port is a LAG primary.
- Live
Date string - The date the port went live.
- Location
Id float64 - The numeric location ID of the port.
- Locked bool
- Whether the port is locked.
- Market string
- The market the port is in.
- Marketplace
Visibility bool - Whether the port is visible in the Marketplace.
- Port
Speed float64 - The bandwidth speed of the port in Mbps.
- Product
Name string - The name of the port.
- Product
Uid string - The unique identifier of the port.
- Provisioning
Status string - The provisioning status of the port.
- map[string]string
- The resource tags associated with the port. Only populated when includeresourcetags is set to true; null otherwise (including when the port has no tags).
- Secondary
Name string - The secondary name of the port.
- Terminate
Date string - The date the port will be terminated.
- Vxc
Auto boolApproval - Whether VXC connections are auto-approved on this port.
- Vxc
Permitted bool - Whether VXC connections are permitted on this port.
- admin_
locked bool - Whether the port is admin locked.
- aggregation_
id number - Numeric ID of the LAG aggregation this port belongs to. Zero if the port is not part of a LAG.
- cancelable bool
- Whether the port can be cancelled.
- company_
name string - The name of the company that owns the port.
- company_
uid string - The Megaport Company UID of the port owner.
- contract_
end_ stringdate - The contract end date of the port.
- contract_
start_ stringdate - The contract start date of the port.
- contract_
term_ numbermonths - The contract term of the port in months.
- cost_
centre string - The cost centre of the port for billing purposes.
- create_
date string - The date the port was created.
- created_
by string - The user who created the port.
- diversity_
zone string - The diversity zone of the port.
- lag_
count number - The number of ports in the LAG. Zero if the port is not part of a LAG.
- lag_
id number - Numeric ID of the LAG this port belongs to. Zero if the port is not part of a LAG.
- lag_
port_ list(string)uids - The unique identifiers of the ports in the LAG. Null if the port is not part of a LAG.
- lag_
primary bool - Whether the port is a LAG primary.
- live_
date string - The date the port went live.
- location_
id number - The numeric location ID of the port.
- locked bool
- Whether the port is locked.
- market string
- The market the port is in.
- marketplace_
visibility bool - Whether the port is visible in the Marketplace.
- port_
speed number - The bandwidth speed of the port in Mbps.
- product_
name string - The name of the port.
- product_
uid string - The unique identifier of the port.
- provisioning_
status string - The provisioning status of the port.
- map(string)
- The resource tags associated with the port. Only populated when includeresourcetags is set to true; null otherwise (including when the port has no tags).
- secondary_
name string - The secondary name of the port.
- terminate_
date string - The date the port will be terminated.
- vxc_
auto_ boolapproval - Whether VXC connections are auto-approved on this port.
- vxc_
permitted bool - Whether VXC connections are permitted on this port.
- admin
Locked Boolean - Whether the port is admin locked.
- aggregation
Id Double - Numeric ID of the LAG aggregation this port belongs to. Zero if the port is not part of a LAG.
- cancelable Boolean
- Whether the port can be cancelled.
- company
Name String - The name of the company that owns the port.
- company
Uid String - The Megaport Company UID of the port owner.
- contract
End StringDate - The contract end date of the port.
- contract
Start StringDate - The contract start date of the port.
- contract
Term DoubleMonths - The contract term of the port in months.
- cost
Centre String - The cost centre of the port for billing purposes.
- create
Date String - The date the port was created.
- created
By String - The user who created the port.
- diversity
Zone String - The diversity zone of the port.
- lag
Count Double - The number of ports in the LAG. Zero if the port is not part of a LAG.
- lag
Id Double - Numeric ID of the LAG this port belongs to. Zero if the port is not part of a LAG.
- lag
Port List<String>Uids - The unique identifiers of the ports in the LAG. Null if the port is not part of a LAG.
- lag
Primary Boolean - Whether the port is a LAG primary.
- live
Date String - The date the port went live.
- location
Id Double - The numeric location ID of the port.
- locked Boolean
- Whether the port is locked.
- market String
- The market the port is in.
- marketplace
Visibility Boolean - Whether the port is visible in the Marketplace.
- port
Speed Double - The bandwidth speed of the port in Mbps.
- product
Name String - The name of the port.
- product
Uid String - The unique identifier of the port.
- provisioning
Status String - The provisioning status of the port.
- Map<String,String>
- The resource tags associated with the port. Only populated when includeresourcetags is set to true; null otherwise (including when the port has no tags).
- secondary
Name String - The secondary name of the port.
- terminate
Date String - The date the port will be terminated.
- vxc
Auto BooleanApproval - Whether VXC connections are auto-approved on this port.
- vxc
Permitted Boolean - Whether VXC connections are permitted on this port.
- admin
Locked boolean - Whether the port is admin locked.
- aggregation
Id number - Numeric ID of the LAG aggregation this port belongs to. Zero if the port is not part of a LAG.
- cancelable boolean
- Whether the port can be cancelled.
- company
Name string - The name of the company that owns the port.
- company
Uid string - The Megaport Company UID of the port owner.
- contract
End stringDate - The contract end date of the port.
- contract
Start stringDate - The contract start date of the port.
- contract
Term numberMonths - The contract term of the port in months.
- cost
Centre string - The cost centre of the port for billing purposes.
- create
Date string - The date the port was created.
- created
By string - The user who created the port.
- diversity
Zone string - The diversity zone of the port.
- lag
Count number - The number of ports in the LAG. Zero if the port is not part of a LAG.
- lag
Id number - Numeric ID of the LAG this port belongs to. Zero if the port is not part of a LAG.
- lag
Port string[]Uids - The unique identifiers of the ports in the LAG. Null if the port is not part of a LAG.
- lag
Primary boolean - Whether the port is a LAG primary.
- live
Date string - The date the port went live.
- location
Id number - The numeric location ID of the port.
- locked boolean
- Whether the port is locked.
- market string
- The market the port is in.
- marketplace
Visibility boolean - Whether the port is visible in the Marketplace.
- port
Speed number - The bandwidth speed of the port in Mbps.
- product
Name string - The name of the port.
- product
Uid string - The unique identifier of the port.
- provisioning
Status string - The provisioning status of the port.
- {[key: string]: string}
- The resource tags associated with the port. Only populated when includeresourcetags is set to true; null otherwise (including when the port has no tags).
- secondary
Name string - The secondary name of the port.
- terminate
Date string - The date the port will be terminated.
- vxc
Auto booleanApproval - Whether VXC connections are auto-approved on this port.
- vxc
Permitted boolean - Whether VXC connections are permitted on this port.
- admin_
locked bool - Whether the port is admin locked.
- aggregation_
id float - Numeric ID of the LAG aggregation this port belongs to. Zero if the port is not part of a LAG.
- cancelable bool
- Whether the port can be cancelled.
- company_
name str - The name of the company that owns the port.
- company_
uid str - The Megaport Company UID of the port owner.
- contract_
end_ strdate - The contract end date of the port.
- contract_
start_ strdate - The contract start date of the port.
- contract_
term_ floatmonths - The contract term of the port in months.
- cost_
centre str - The cost centre of the port for billing purposes.
- create_
date str - The date the port was created.
- created_
by str - The user who created the port.
- diversity_
zone str - The diversity zone of the port.
- lag_
count float - The number of ports in the LAG. Zero if the port is not part of a LAG.
- lag_
id float - Numeric ID of the LAG this port belongs to. Zero if the port is not part of a LAG.
- lag_
port_ Sequence[str]uids - The unique identifiers of the ports in the LAG. Null if the port is not part of a LAG.
- lag_
primary bool - Whether the port is a LAG primary.
- live_
date str - The date the port went live.
- location_
id float - The numeric location ID of the port.
- locked bool
- Whether the port is locked.
- market str
- The market the port is in.
- marketplace_
visibility bool - Whether the port is visible in the Marketplace.
- port_
speed float - The bandwidth speed of the port in Mbps.
- product_
name str - The name of the port.
- product_
uid str - The unique identifier of the port.
- provisioning_
status str - The provisioning status of the port.
- Mapping[str, str]
- The resource tags associated with the port. Only populated when includeresourcetags is set to true; null otherwise (including when the port has no tags).
- secondary_
name str - The secondary name of the port.
- terminate_
date str - The date the port will be terminated.
- vxc_
auto_ boolapproval - Whether VXC connections are auto-approved on this port.
- vxc_
permitted bool - Whether VXC connections are permitted on this port.
- admin
Locked Boolean - Whether the port is admin locked.
- aggregation
Id Number - Numeric ID of the LAG aggregation this port belongs to. Zero if the port is not part of a LAG.
- cancelable Boolean
- Whether the port can be cancelled.
- company
Name String - The name of the company that owns the port.
- company
Uid String - The Megaport Company UID of the port owner.
- contract
End StringDate - The contract end date of the port.
- contract
Start StringDate - The contract start date of the port.
- contract
Term NumberMonths - The contract term of the port in months.
- cost
Centre String - The cost centre of the port for billing purposes.
- create
Date String - The date the port was created.
- created
By String - The user who created the port.
- diversity
Zone String - The diversity zone of the port.
- lag
Count Number - The number of ports in the LAG. Zero if the port is not part of a LAG.
- lag
Id Number - Numeric ID of the LAG this port belongs to. Zero if the port is not part of a LAG.
- lag
Port List<String>Uids - The unique identifiers of the ports in the LAG. Null if the port is not part of a LAG.
- lag
Primary Boolean - Whether the port is a LAG primary.
- live
Date String - The date the port went live.
- location
Id Number - The numeric location ID of the port.
- locked Boolean
- Whether the port is locked.
- market String
- The market the port is in.
- marketplace
Visibility Boolean - Whether the port is visible in the Marketplace.
- port
Speed Number - The bandwidth speed of the port in Mbps.
- product
Name String - The name of the port.
- product
Uid String - The unique identifier of the port.
- provisioning
Status String - The provisioning status of the port.
- Map<String>
- The resource tags associated with the port. Only populated when includeresourcetags is set to true; null otherwise (including when the port has no tags).
- secondary
Name String - The secondary name of the port.
- terminate
Date String - The date the port will be terminated.
- vxc
Auto BooleanApproval - Whether VXC connections are auto-approved on this port.
- vxc
Permitted Boolean - Whether VXC connections are permitted on this port.
Package Details
- Repository
- megaport megaport/terraform-provider-megaport
- License
- Notes
- This Pulumi package is based on the
megaportTerraform Provider.
Viewing docs for megaport 1.19.1
published on Monday, Sep 28, 2026 by megaport
published on Monday, Sep 28, 2026 by megaport