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:
- Admin
State boolUp The administrative state of the port.
- Description string
Human-readable description of the port.
- Device
Id string The ID of the device the port belongs to.
- Device
Owner string The device owner of the port.
- Dns
Name string - Fixed
Ip string The port IP address filter.
- Mac
Address string The MAC address of the port.
- Name string
The name of the port.
- Network
Id string The ID of the network the port belongs to.
- Project
Id 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
regionargument of the provider is used.- Security
Group List<string>Ids The list of port security group IDs to filter.
- Sort
Direction string Order the results in either
ascordesc. Defaults to none.- Sort
Key string Sort ports based on a certain key. Defaults to none.
- Status string
The status of the port.
- List<string>
The list of port tags to filter.
- Tenant
Id string
- Admin
State boolUp The administrative state of the port.
- Description string
Human-readable description of the port.
- Device
Id string The ID of the device the port belongs to.
- Device
Owner string The device owner of the port.
- Dns
Name string - Fixed
Ip string The port IP address filter.
- Mac
Address string The MAC address of the port.
- Name string
The name of the port.
- Network
Id string The ID of the network the port belongs to.
- Project
Id 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
regionargument of the provider is used.- Security
Group []stringIds The list of port security group IDs to filter.
- Sort
Direction string Order the results in either
ascordesc. Defaults to none.- Sort
Key string Sort ports based on a certain key. Defaults to none.
- Status string
The status of the port.
- []string
The list of port tags to filter.
- Tenant
Id string
- admin
State booleanUp The administrative state of the port.
- description string
Human-readable description of the port.
- device
Id string The ID of the device the port belongs to.
- device
Owner string The device owner of the port.
- dns
Name string - fixed
Ip string The port IP address filter.
- mac
Address string The MAC address of the port.
- name string
The name of the port.
- network
Id string The ID of the network the port belongs to.
- project
Id 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
regionargument of the provider is used.- security
Group string[]Ids The list of port security group IDs to filter.
- sort
Direction string Order the results in either
ascordesc. Defaults to none.- sort
Key string Sort ports based on a certain key. Defaults to none.
- status string
The status of the port.
- string[]
The list of port tags to filter.
- tenant
Id string
- admin_
state_ boolup 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
regionargument of the provider is used.- security_
group_ List[str]ids The list of port security group IDs to filter.
- sort_
direction str Order the results in either
ascordesc. Defaults to none.- sort_
key str Sort ports based on a certain key. Defaults to none.
- status str
The status of the port.
- 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>
- Admin
State boolUp - Description string
- Device
Id string - Device
Owner string - Dns
Name string - Fixed
Ip string - Mac
Address string - Name string
- Network
Id string - Project
Id string - Region string
- Security
Group List<string>Ids - Sort
Direction string - Sort
Key string - Status string
- List<string>
- Tenant
Id string
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
- Admin
State boolUp - Description string
- Device
Id string - Device
Owner string - Dns
Name string - Fixed
Ip string - Mac
Address string - Name string
- Network
Id string - Project
Id string - Region string
- Security
Group []stringIds - Sort
Direction string - Sort
Key string - Status string
- []string
- Tenant
Id string
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
- admin
State booleanUp - description string
- device
Id string - device
Owner string - dns
Name string - fixed
Ip string - mac
Address string - name string
- network
Id string - project
Id string - region string
- security
Group string[]Ids - sort
Direction string - sort
Key string - status string
- string[]
- tenant
Id string
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
- admin_
state_ boolup - 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_ List[str]ids - sort_
direction str - sort_
key str - status str
- 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
openstackTerraform Provider.