1. Packages
  2. Opentelekomcloud Provider
  3. API Docs
  4. getNetworkingPortIdsV2
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

opentelekomcloud.getNetworkingPortIdsV2

Explore with Pulumi AI

opentelekomcloud logo
opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud

    Up-to-date reference of API arguments for Network port you can get at documentation portal

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const ports = opentelekomcloud.getNetworkingPortIdsV2({
        name: "port",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    ports = opentelekomcloud.get_networking_port_ids_v2(name="port")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opentelekomcloud/opentelekomcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opentelekomcloud.GetNetworkingPortIdsV2(ctx, &opentelekomcloud.GetNetworkingPortIdsV2Args{
    			Name: pulumi.StringRef("port"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opentelekomcloud = Pulumi.Opentelekomcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ports = Opentelekomcloud.GetNetworkingPortIdsV2.Invoke(new()
        {
            Name = "port",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opentelekomcloud.OpentelekomcloudFunctions;
    import com.pulumi.opentelekomcloud.inputs.GetNetworkingPortIdsV2Args;
    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 ports = OpentelekomcloudFunctions.getNetworkingPortIdsV2(GetNetworkingPortIdsV2Args.builder()
                .name("port")
                .build());
    
        }
    }
    
    variables:
      ports:
        fn::invoke:
          function: opentelekomcloud:getNetworkingPortIdsV2
          arguments:
            name: port
    

    Using getNetworkingPortIdsV2

    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 getNetworkingPortIdsV2(args: GetNetworkingPortIdsV2Args, opts?: InvokeOptions): Promise<GetNetworkingPortIdsV2Result>
    function getNetworkingPortIdsV2Output(args: GetNetworkingPortIdsV2OutputArgs, opts?: InvokeOptions): Output<GetNetworkingPortIdsV2Result>
    def get_networking_port_ids_v2(device_id: Optional[str] = None,
                                   device_owner: Optional[str] = None,
                                   fixed_ip: Optional[str] = None,
                                   id: Optional[str] = None,
                                   mac_address: Optional[str] = None,
                                   name: Optional[str] = None,
                                   network_id: Optional[str] = None,
                                   project_id: Optional[str] = None,
                                   region: Optional[str] = None,
                                   security_group_ids: Optional[Sequence[str]] = None,
                                   sort_direction: Optional[str] = None,
                                   sort_key: Optional[str] = None,
                                   status: Optional[str] = None,
                                   tenant_id: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetNetworkingPortIdsV2Result
    def get_networking_port_ids_v2_output(device_id: Optional[pulumi.Input[str]] = None,
                                   device_owner: Optional[pulumi.Input[str]] = None,
                                   fixed_ip: Optional[pulumi.Input[str]] = None,
                                   id: Optional[pulumi.Input[str]] = None,
                                   mac_address: Optional[pulumi.Input[str]] = None,
                                   name: Optional[pulumi.Input[str]] = None,
                                   network_id: Optional[pulumi.Input[str]] = None,
                                   project_id: Optional[pulumi.Input[str]] = None,
                                   region: Optional[pulumi.Input[str]] = None,
                                   security_group_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                   sort_direction: Optional[pulumi.Input[str]] = None,
                                   sort_key: Optional[pulumi.Input[str]] = None,
                                   status: Optional[pulumi.Input[str]] = None,
                                   tenant_id: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetNetworkingPortIdsV2Result]
    func GetNetworkingPortIdsV2(ctx *Context, args *GetNetworkingPortIdsV2Args, opts ...InvokeOption) (*GetNetworkingPortIdsV2Result, error)
    func GetNetworkingPortIdsV2Output(ctx *Context, args *GetNetworkingPortIdsV2OutputArgs, opts ...InvokeOption) GetNetworkingPortIdsV2ResultOutput

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

    public static class GetNetworkingPortIdsV2 
    {
        public static Task<GetNetworkingPortIdsV2Result> InvokeAsync(GetNetworkingPortIdsV2Args args, InvokeOptions? opts = null)
        public static Output<GetNetworkingPortIdsV2Result> Invoke(GetNetworkingPortIdsV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkingPortIdsV2Result> getNetworkingPortIdsV2(GetNetworkingPortIdsV2Args args, InvokeOptions options)
    public static Output<GetNetworkingPortIdsV2Result> getNetworkingPortIdsV2(GetNetworkingPortIdsV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getNetworkingPortIdsV2:getNetworkingPortIdsV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DeviceId string
    The ID of the device the port belongs to.
    DeviceOwner string
    The device owner of the port.
    FixedIp string
    The port IP address filter.
    Id string
    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.
    TenantId string
    DeviceId string
    The ID of the device the port belongs to.
    DeviceOwner string
    The device owner of the port.
    FixedIp string
    The port IP address filter.
    Id string
    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.
    TenantId string
    deviceId String
    The ID of the device the port belongs to.
    deviceOwner String
    The device owner of the port.
    fixedIp String
    The port IP address filter.
    id String
    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.
    tenantId String
    deviceId string
    The ID of the device the port belongs to.
    deviceOwner string
    The device owner of the port.
    fixedIp string
    The port IP address filter.
    id string
    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.
    tenantId string
    device_id str
    The ID of the device the port belongs to.
    device_owner str
    The device owner of the port.
    fixed_ip str
    The port IP address filter.
    id str
    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 Sequence[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.
    tenant_id str
    deviceId String
    The ID of the device the port belongs to.
    deviceOwner String
    The device owner of the port.
    fixedIp String
    The port IP address filter.
    id String
    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.
    tenantId String

    getNetworkingPortIdsV2 Result

    The following output properties are available:

    Id string
    Ids List<string>
    DeviceId string
    DeviceOwner string
    FixedIp string
    MacAddress string
    Name string
    NetworkId string
    ProjectId string
    Region string
    SecurityGroupIds List<string>
    SortDirection string
    SortKey string
    Status string
    TenantId string
    Id string
    Ids []string
    DeviceId string
    DeviceOwner string
    FixedIp string
    MacAddress string
    Name string
    NetworkId string
    ProjectId string
    Region string
    SecurityGroupIds []string
    SortDirection string
    SortKey string
    Status string
    TenantId string
    id String
    ids List<String>
    deviceId String
    deviceOwner String
    fixedIp String
    macAddress String
    name String
    networkId String
    projectId String
    region String
    securityGroupIds List<String>
    sortDirection String
    sortKey String
    status String
    tenantId String
    id string
    ids string[]
    deviceId string
    deviceOwner string
    fixedIp string
    macAddress string
    name string
    networkId string
    projectId string
    region string
    securityGroupIds string[]
    sortDirection string
    sortKey string
    status string
    tenantId string
    id String
    ids List<String>
    deviceId String
    deviceOwner String
    fixedIp String
    macAddress String
    name String
    networkId String
    projectId String
    region String
    securityGroupIds List<String>
    sortDirection String
    sortKey String
    status String
    tenantId String

    Package Details

    Repository
    opentelekomcloud opentelekomcloud/terraform-provider-opentelekomcloud
    License
    Notes
    This Pulumi package is based on the opentelekomcloud Terraform Provider.
    opentelekomcloud logo
    opentelekomcloud 1.36.37 published on Thursday, Apr 24, 2025 by opentelekomcloud