OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi
openstack.networking.getSegmentV2
Explore with Pulumi AI
Use this data source to get the ID of an available OpenStack network.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const network = openstack.networking.getSegmentV2({
name: "tf_test_segment",
});
import pulumi
import pulumi_openstack as openstack
network = openstack.networking.get_segment_v2(name="tf_test_segment")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/networking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networking.LookupSegmentV2(ctx, &networking.LookupSegmentV2Args{
Name: pulumi.StringRef("tf_test_segment"),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using OpenStack = Pulumi.OpenStack;
return await Deployment.RunAsync(() =>
{
var network = OpenStack.Networking.GetSegmentV2.Invoke(new()
{
Name = "tf_test_segment",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.openstack.networking.NetworkingFunctions;
import com.pulumi.openstack.networking.inputs.GetSegmentV2Args;
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 network = NetworkingFunctions.getSegmentV2(GetSegmentV2Args.builder()
.name("tf_test_segment")
.build());
}
}
variables:
network:
fn::invoke:
function: openstack:networking:getSegmentV2
arguments:
name: tf_test_segment
Using getSegmentV2
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 getSegmentV2(args: GetSegmentV2Args, opts?: InvokeOptions): Promise<GetSegmentV2Result>
function getSegmentV2Output(args: GetSegmentV2OutputArgs, opts?: InvokeOptions): Output<GetSegmentV2Result>
def get_segment_v2(description: Optional[str] = None,
name: Optional[str] = None,
network_id: Optional[str] = None,
network_type: Optional[str] = None,
physical_network: Optional[str] = None,
region: Optional[str] = None,
revision_number: Optional[int] = None,
segment_id: Optional[str] = None,
segmentation_id: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetSegmentV2Result
def get_segment_v2_output(description: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
network_id: Optional[pulumi.Input[str]] = None,
network_type: Optional[pulumi.Input[str]] = None,
physical_network: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
revision_number: Optional[pulumi.Input[int]] = None,
segment_id: Optional[pulumi.Input[str]] = None,
segmentation_id: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSegmentV2Result]
func LookupSegmentV2(ctx *Context, args *LookupSegmentV2Args, opts ...InvokeOption) (*LookupSegmentV2Result, error)
func LookupSegmentV2Output(ctx *Context, args *LookupSegmentV2OutputArgs, opts ...InvokeOption) LookupSegmentV2ResultOutput
> Note: This function is named LookupSegmentV2
in the Go SDK.
public static class GetSegmentV2
{
public static Task<GetSegmentV2Result> InvokeAsync(GetSegmentV2Args args, InvokeOptions? opts = null)
public static Output<GetSegmentV2Result> Invoke(GetSegmentV2InvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSegmentV2Result> getSegmentV2(GetSegmentV2Args args, InvokeOptions options)
public static Output<GetSegmentV2Result> getSegmentV2(GetSegmentV2Args args, InvokeOptions options)
fn::invoke:
function: openstack:networking/getSegmentV2:getSegmentV2
arguments:
# arguments dictionary
The following arguments are supported:
- Description string
- Human-readable description of the network segment.
- Name string
- The name of the network segment.
- Network
Id string - The ID of the network.
- Network
Type string - The type of the network, such as
vlan
,vxlan
,flat
,gre
,geneve
, orlocal
. - Physical
Network string - The name of the physical network.
- Region string
- The region in which to obtain the V2 Neutron client.
A Neutron client is needed to retrieve networks ids. If omitted, the
region
argument of the provider is used. - Revision
Number int - See Argument Reference above.
- Segment
Id string - The ID of the network segment
- Segmentation
Id int - The segmentation ID of the network segment.
- Description string
- Human-readable description of the network segment.
- Name string
- The name of the network segment.
- Network
Id string - The ID of the network.
- Network
Type string - The type of the network, such as
vlan
,vxlan
,flat
,gre
,geneve
, orlocal
. - Physical
Network string - The name of the physical network.
- Region string
- The region in which to obtain the V2 Neutron client.
A Neutron client is needed to retrieve networks ids. If omitted, the
region
argument of the provider is used. - Revision
Number int - See Argument Reference above.
- Segment
Id string - The ID of the network segment
- Segmentation
Id int - The segmentation ID of the network segment.
- description String
- Human-readable description of the network segment.
- name String
- The name of the network segment.
- network
Id String - The ID of the network.
- network
Type String - The type of the network, such as
vlan
,vxlan
,flat
,gre
,geneve
, orlocal
. - physical
Network String - The name of the physical network.
- region String
- The region in which to obtain the V2 Neutron client.
A Neutron client is needed to retrieve networks ids. If omitted, the
region
argument of the provider is used. - revision
Number Integer - See Argument Reference above.
- segment
Id String - The ID of the network segment
- segmentation
Id Integer - The segmentation ID of the network segment.
- description string
- Human-readable description of the network segment.
- name string
- The name of the network segment.
- network
Id string - The ID of the network.
- network
Type string - The type of the network, such as
vlan
,vxlan
,flat
,gre
,geneve
, orlocal
. - physical
Network string - The name of the physical network.
- region string
- The region in which to obtain the V2 Neutron client.
A Neutron client is needed to retrieve networks ids. If omitted, the
region
argument of the provider is used. - revision
Number number - See Argument Reference above.
- segment
Id string - The ID of the network segment
- segmentation
Id number - The segmentation ID of the network segment.
- description str
- Human-readable description of the network segment.
- name str
- The name of the network segment.
- network_
id str - The ID of the network.
- network_
type str - The type of the network, such as
vlan
,vxlan
,flat
,gre
,geneve
, orlocal
. - physical_
network str - The name of the physical network.
- region str
- The region in which to obtain the V2 Neutron client.
A Neutron client is needed to retrieve networks ids. If omitted, the
region
argument of the provider is used. - revision_
number int - See Argument Reference above.
- segment_
id str - The ID of the network segment
- segmentation_
id int - The segmentation ID of the network segment.
- description String
- Human-readable description of the network segment.
- name String
- The name of the network segment.
- network
Id String - The ID of the network.
- network
Type String - The type of the network, such as
vlan
,vxlan
,flat
,gre
,geneve
, orlocal
. - physical
Network String - The name of the physical network.
- region String
- The region in which to obtain the V2 Neutron client.
A Neutron client is needed to retrieve networks ids. If omitted, the
region
argument of the provider is used. - revision
Number Number - See Argument Reference above.
- segment
Id String - The ID of the network segment
- segmentation
Id Number - The segmentation ID of the network segment.
getSegmentV2 Result
The following output properties are available:
- Created
At string - The date and time when the network segment was created.
- Description string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- See Argument Reference above.
- Network
Id string - See Argument Reference above.
- Network
Type string - See Argument Reference above.
- Physical
Network string - See Argument Reference above.
- Region string
- Revision
Number int - See Argument Reference above.
- Segment
Id string - See Argument Reference above.
- Segmentation
Id int - See Argument Reference above.
- Updated
At string - The date and time when the network segment was last updated.
- Created
At string - The date and time when the network segment was created.
- Description string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- See Argument Reference above.
- Network
Id string - See Argument Reference above.
- Network
Type string - See Argument Reference above.
- Physical
Network string - See Argument Reference above.
- Region string
- Revision
Number int - See Argument Reference above.
- Segment
Id string - See Argument Reference above.
- Segmentation
Id int - See Argument Reference above.
- Updated
At string - The date and time when the network segment was last updated.
- created
At String - The date and time when the network segment was created.
- description String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- See Argument Reference above.
- network
Id String - See Argument Reference above.
- network
Type String - See Argument Reference above.
- physical
Network String - See Argument Reference above.
- region String
- revision
Number Integer - See Argument Reference above.
- segment
Id String - See Argument Reference above.
- segmentation
Id Integer - See Argument Reference above.
- updated
At String - The date and time when the network segment was last updated.
- created
At string - The date and time when the network segment was created.
- description string
- See Argument Reference above.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- See Argument Reference above.
- network
Id string - See Argument Reference above.
- network
Type string - See Argument Reference above.
- physical
Network string - See Argument Reference above.
- region string
- revision
Number number - See Argument Reference above.
- segment
Id string - See Argument Reference above.
- segmentation
Id number - See Argument Reference above.
- updated
At string - The date and time when the network segment was last updated.
- created_
at str - The date and time when the network segment was created.
- description str
- See Argument Reference above.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- See Argument Reference above.
- network_
id str - See Argument Reference above.
- network_
type str - See Argument Reference above.
- physical_
network str - See Argument Reference above.
- region str
- revision_
number int - See Argument Reference above.
- segment_
id str - See Argument Reference above.
- segmentation_
id int - See Argument Reference above.
- updated_
at str - The date and time when the network segment was last updated.
- created
At String - The date and time when the network segment was created.
- description String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- See Argument Reference above.
- network
Id String - See Argument Reference above.
- network
Type String - See Argument Reference above.
- physical
Network String - See Argument Reference above.
- region String
- revision
Number Number - See Argument Reference above.
- segment
Id String - See Argument Reference above.
- segmentation
Id Number - See Argument Reference above.
- updated
At String - The date and time when the network segment was last updated.
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.