GetPortIds

Use this data source to get a list of Openstack Port IDs matching the specified criteria.

Example Usage

using Pulumi;
using OpenStack = Pulumi.OpenStack;

class MyStack : Stack
{
    public MyStack()
    {
        var ports = Output.Create(OpenStack.Networking.GetPortIds.InvokeAsync(new OpenStack.Networking.GetPortIdsArgs
        {
            Name = "port",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_openstack as openstack

ports = openstack.networking.get_port_ids(name="port")
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";

const ports = pulumi.output(openstack.networking.getPortIds({
    name: "port",
}, { async: true }));

Using GetPortIds

function getPortIds(args: GetPortIdsArgs, opts?: InvokeOptions): Promise<GetPortIdsResult>
function  get_port_ids(admin_state_up=None, description=None, device_id=None, device_owner=None, dns_name=None, fixed_ip=None, mac_address=None, name=None, network_id=None, project_id=None, region=None, security_group_ids=None, sort_direction=None, sort_key=None, status=None, tags=None, tenant_id=None, opts=None)
func GetPortIds(ctx *Context, args *GetPortIdsArgs, opts ...InvokeOption) (*GetPortIdsResult, error)
public static class GetPortIds {
    public static Task<GetPortIdsResult> InvokeAsync(GetPortIdsArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AdminStateUp bool

The administrative state of the port.

Description string

Human-readable description of the port.

DeviceId string

The ID of the device the port belongs to.

DeviceOwner string

The device owner of the port.

DnsName string
FixedIp string

The port IP address filter.

MacAddress string

The MAC address of the port.

Name string

The name of the port.

NetworkId string

The ID of the network the port belongs to.

ProjectId string

The owner of the port.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve port ids. If omitted, the region argument of the provider is used.

SecurityGroupIds List<string>

The list of port security group IDs to filter.

SortDirection string

Order the results in either asc or desc. Defaults to none.

SortKey string

Sort ports based on a certain key. Defaults to none.

Status string

The status of the port.

Tags List<string>

The list of port tags to filter.

TenantId string
AdminStateUp bool

The administrative state of the port.

Description string

Human-readable description of the port.

DeviceId string

The ID of the device the port belongs to.

DeviceOwner string

The device owner of the port.

DnsName string
FixedIp string

The port IP address filter.

MacAddress string

The MAC address of the port.

Name string

The name of the port.

NetworkId string

The ID of the network the port belongs to.

ProjectId string

The owner of the port.

Region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve port ids. If omitted, the region argument of the provider is used.

SecurityGroupIds []string

The list of port security group IDs to filter.

SortDirection string

Order the results in either asc or desc. Defaults to none.

SortKey string

Sort ports based on a certain key. Defaults to none.

Status string

The status of the port.

Tags []string

The list of port tags to filter.

TenantId string
adminStateUp boolean

The administrative state of the port.

description string

Human-readable description of the port.

deviceId string

The ID of the device the port belongs to.

deviceOwner string

The device owner of the port.

dnsName string
fixedIp string

The port IP address filter.

macAddress string

The MAC address of the port.

name string

The name of the port.

networkId string

The ID of the network the port belongs to.

projectId string

The owner of the port.

region string

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve port ids. If omitted, the region argument of the provider is used.

securityGroupIds string[]

The list of port security group IDs to filter.

sortDirection string

Order the results in either asc or desc. Defaults to none.

sortKey string

Sort ports based on a certain key. Defaults to none.

status string

The status of the port.

tags string[]

The list of port tags to filter.

tenantId string
admin_state_up bool

The administrative state of the port.

description str

Human-readable description of the port.

device_id str

The ID of the device the port belongs to.

device_owner str

The device owner of the port.

dns_name str
fixed_ip str

The port IP address filter.

mac_address str

The MAC address of the port.

name str

The name of the port.

network_id str

The ID of the network the port belongs to.

project_id str

The owner of the port.

region str

The region in which to obtain the V2 Neutron client. A Neutron client is needed to retrieve port ids. If omitted, the region argument of the provider is used.

security_group_ids List[str]

The list of port security group IDs to filter.

sort_direction str

Order the results in either asc or desc. Defaults to none.

sort_key str

Sort ports based on a certain key. Defaults to none.

status str

The status of the port.

tags List[str]

The list of port tags to filter.

tenant_id str

GetPortIds Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
AdminStateUp bool
Description string
DeviceId string
DeviceOwner string
DnsName string
FixedIp string
MacAddress string
Name string
NetworkId string
ProjectId string
Region string
SecurityGroupIds List<string>
SortDirection string
SortKey string
Status string
Tags List<string>
TenantId string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
AdminStateUp bool
Description string
DeviceId string
DeviceOwner string
DnsName string
FixedIp string
MacAddress string
Name string
NetworkId string
ProjectId string
Region string
SecurityGroupIds []string
SortDirection string
SortKey string
Status string
Tags []string
TenantId string
id string

The provider-assigned unique ID for this managed resource.

ids string[]
adminStateUp boolean
description string
deviceId string
deviceOwner string
dnsName string
fixedIp string
macAddress string
name string
networkId string
projectId string
region string
securityGroupIds string[]
sortDirection string
sortKey string
status string
tags string[]
tenantId string
id str

The provider-assigned unique ID for this managed resource.

ids List[str]
admin_state_up bool
description str
device_id str
device_owner str
dns_name str
fixed_ip str
mac_address str
name str
network_id str
project_id str
region str
security_group_ids List[str]
sort_direction str
sort_key str
status str
tags List[str]
tenant_id str

Package Details

Repository
https://github.com/pulumi/pulumi-openstack
License
Apache-2.0
Notes
This Pulumi package is based on the openstack Terraform Provider.