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

opentelekomcloud.getNetworkingPortV2

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 the ID of an available OpenTelekomCloud port.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as opentelekomcloud from "@pulumi/opentelekomcloud";
    
    const port1 = opentelekomcloud.getNetworkingPortV2({
        name: "port_1",
    });
    
    import pulumi
    import pulumi_opentelekomcloud as opentelekomcloud
    
    port1 = opentelekomcloud.get_networking_port_v2(name="port_1")
    
    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.LookupNetworkingPortV2(ctx, &opentelekomcloud.LookupNetworkingPortV2Args{
    			Name: pulumi.StringRef("port_1"),
    		}, 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 port1 = Opentelekomcloud.GetNetworkingPortV2.Invoke(new()
        {
            Name = "port_1",
        });
    
    });
    
    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.GetNetworkingPortV2Args;
    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 port1 = OpentelekomcloudFunctions.getNetworkingPortV2(GetNetworkingPortV2Args.builder()
                .name("port_1")
                .build());
    
        }
    }
    
    variables:
      port1:
        fn::invoke:
          function: opentelekomcloud:getNetworkingPortV2
          arguments:
            name: port_1
    

    Using getNetworkingPortV2

    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 getNetworkingPortV2(args: GetNetworkingPortV2Args, opts?: InvokeOptions): Promise<GetNetworkingPortV2Result>
    function getNetworkingPortV2Output(args: GetNetworkingPortV2OutputArgs, opts?: InvokeOptions): Output<GetNetworkingPortV2Result>
    def get_networking_port_v2(admin_state_up: Optional[bool] = None,
                               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,
                               port_id: Optional[str] = None,
                               project_id: Optional[str] = None,
                               region: Optional[str] = None,
                               security_group_ids: Optional[Sequence[str]] = None,
                               status: Optional[str] = None,
                               tenant_id: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetNetworkingPortV2Result
    def get_networking_port_v2_output(admin_state_up: Optional[pulumi.Input[bool]] = None,
                               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,
                               port_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,
                               status: Optional[pulumi.Input[str]] = None,
                               tenant_id: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetNetworkingPortV2Result]
    func LookupNetworkingPortV2(ctx *Context, args *LookupNetworkingPortV2Args, opts ...InvokeOption) (*LookupNetworkingPortV2Result, error)
    func LookupNetworkingPortV2Output(ctx *Context, args *LookupNetworkingPortV2OutputArgs, opts ...InvokeOption) LookupNetworkingPortV2ResultOutput

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

    public static class GetNetworkingPortV2 
    {
        public static Task<GetNetworkingPortV2Result> InvokeAsync(GetNetworkingPortV2Args args, InvokeOptions? opts = null)
        public static Output<GetNetworkingPortV2Result> Invoke(GetNetworkingPortV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNetworkingPortV2Result> getNetworkingPortV2(GetNetworkingPortV2Args args, InvokeOptions options)
    public static Output<GetNetworkingPortV2Result> getNetworkingPortV2(GetNetworkingPortV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: opentelekomcloud:index/getNetworkingPortV2:getNetworkingPortV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AdminStateUp bool
    The administrative state of the port.
    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.
    PortId string
    The ID of the port.
    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.
    Status string
    The status of the port.
    TenantId string
    AdminStateUp bool
    The administrative state of the port.
    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.
    PortId string
    The ID of the port.
    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.
    Status string
    The status of the port.
    TenantId string
    adminStateUp Boolean
    The administrative state of the port.
    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.
    portId String
    The ID of the port.
    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.
    status String
    The status of the port.
    tenantId String
    adminStateUp boolean
    The administrative state of the port.
    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.
    portId string
    The ID of the port.
    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.
    status string
    The status of the port.
    tenantId string
    admin_state_up bool
    The administrative state of the port.
    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.
    port_id str
    The ID of the port.
    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.
    status str
    The status of the port.
    tenant_id str
    adminStateUp Boolean
    The administrative state of the port.
    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.
    portId String
    The ID of the port.
    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.
    status String
    The status of the port.
    tenantId String

    getNetworkingPortV2 Result

    The following output properties are available:

    AllFixedIps List<string>
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    AllSecurityGroupIds List<string>
    The set of security group IDs applied on the port.
    Id string
    AdminStateUp bool
    See Argument Reference above.
    DeviceId string
    See Argument Reference above.
    DeviceOwner string
    See Argument Reference above.
    FixedIp string
    MacAddress string
    See Argument Reference above.
    Name string
    See Argument Reference above.
    NetworkId string
    See Argument Reference above.
    PortId string
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    Region string
    See Argument Reference above.
    SecurityGroupIds List<string>
    Status string
    TenantId string
    AllFixedIps []string
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    AllSecurityGroupIds []string
    The set of security group IDs applied on the port.
    Id string
    AdminStateUp bool
    See Argument Reference above.
    DeviceId string
    See Argument Reference above.
    DeviceOwner string
    See Argument Reference above.
    FixedIp string
    MacAddress string
    See Argument Reference above.
    Name string
    See Argument Reference above.
    NetworkId string
    See Argument Reference above.
    PortId string
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    Region string
    See Argument Reference above.
    SecurityGroupIds []string
    Status string
    TenantId string
    allFixedIps List<String>
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    allSecurityGroupIds List<String>
    The set of security group IDs applied on the port.
    id String
    adminStateUp Boolean
    See Argument Reference above.
    deviceId String
    See Argument Reference above.
    deviceOwner String
    See Argument Reference above.
    fixedIp String
    macAddress String
    See Argument Reference above.
    name String
    See Argument Reference above.
    networkId String
    See Argument Reference above.
    portId String
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    region String
    See Argument Reference above.
    securityGroupIds List<String>
    status String
    tenantId String
    allFixedIps string[]
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    allSecurityGroupIds string[]
    The set of security group IDs applied on the port.
    id string
    adminStateUp boolean
    See Argument Reference above.
    deviceId string
    See Argument Reference above.
    deviceOwner string
    See Argument Reference above.
    fixedIp string
    macAddress string
    See Argument Reference above.
    name string
    See Argument Reference above.
    networkId string
    See Argument Reference above.
    portId string
    See Argument Reference above.
    projectId string
    See Argument Reference above.
    region string
    See Argument Reference above.
    securityGroupIds string[]
    status string
    tenantId string
    all_fixed_ips Sequence[str]
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    all_security_group_ids Sequence[str]
    The set of security group IDs applied on the port.
    id str
    admin_state_up bool
    See Argument Reference above.
    device_id str
    See Argument Reference above.
    device_owner str
    See Argument Reference above.
    fixed_ip str
    mac_address str
    See Argument Reference above.
    name str
    See Argument Reference above.
    network_id str
    See Argument Reference above.
    port_id str
    See Argument Reference above.
    project_id str
    See Argument Reference above.
    region str
    See Argument Reference above.
    security_group_ids Sequence[str]
    status str
    tenant_id str
    allFixedIps List<String>
    The collection of Fixed IP addresses on the port in the order returned by the Network v2 API.
    allSecurityGroupIds List<String>
    The set of security group IDs applied on the port.
    id String
    adminStateUp Boolean
    See Argument Reference above.
    deviceId String
    See Argument Reference above.
    deviceOwner String
    See Argument Reference above.
    fixedIp String
    macAddress String
    See Argument Reference above.
    name String
    See Argument Reference above.
    networkId String
    See Argument Reference above.
    portId String
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    region String
    See Argument Reference above.
    securityGroupIds List<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