OpenStack v5.0.0 published on Friday, Sep 27, 2024 by Pulumi
openstack.networking.getSubnetPool
Explore with Pulumi AI
Use this data source to get the ID of an available OpenStack subnetpool.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const subnetpool1 = openstack.networking.getSubnetPool({
name: "subnetpool_1",
});
import pulumi
import pulumi_openstack as openstack
subnetpool1 = openstack.networking.get_subnet_pool(name="subnetpool_1")
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.LookupSubnetPool(ctx, &networking.LookupSubnetPoolArgs{
Name: pulumi.StringRef("subnetpool_1"),
}, 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 subnetpool1 = OpenStack.Networking.GetSubnetPool.Invoke(new()
{
Name = "subnetpool_1",
});
});
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.GetSubnetPoolArgs;
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 subnetpool1 = NetworkingFunctions.getSubnetPool(GetSubnetPoolArgs.builder()
.name("subnetpool_1")
.build());
}
}
variables:
subnetpool1:
fn::invoke:
Function: openstack:networking:getSubnetPool
Arguments:
name: subnetpool_1
Using getSubnetPool
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 getSubnetPool(args: GetSubnetPoolArgs, opts?: InvokeOptions): Promise<GetSubnetPoolResult>
function getSubnetPoolOutput(args: GetSubnetPoolOutputArgs, opts?: InvokeOptions): Output<GetSubnetPoolResult>
def get_subnet_pool(address_scope_id: Optional[str] = None,
default_prefixlen: Optional[int] = None,
default_quota: Optional[int] = None,
description: Optional[str] = None,
ip_version: Optional[int] = None,
is_default: Optional[bool] = None,
max_prefixlen: Optional[int] = None,
min_prefixlen: Optional[int] = None,
name: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
shared: Optional[bool] = None,
tags: Optional[Sequence[str]] = None,
opts: Optional[InvokeOptions] = None) -> GetSubnetPoolResult
def get_subnet_pool_output(address_scope_id: Optional[pulumi.Input[str]] = None,
default_prefixlen: Optional[pulumi.Input[int]] = None,
default_quota: Optional[pulumi.Input[int]] = None,
description: Optional[pulumi.Input[str]] = None,
ip_version: Optional[pulumi.Input[int]] = None,
is_default: Optional[pulumi.Input[bool]] = None,
max_prefixlen: Optional[pulumi.Input[int]] = None,
min_prefixlen: Optional[pulumi.Input[int]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
shared: Optional[pulumi.Input[bool]] = None,
tags: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetSubnetPoolResult]
func LookupSubnetPool(ctx *Context, args *LookupSubnetPoolArgs, opts ...InvokeOption) (*LookupSubnetPoolResult, error)
func LookupSubnetPoolOutput(ctx *Context, args *LookupSubnetPoolOutputArgs, opts ...InvokeOption) LookupSubnetPoolResultOutput
> Note: This function is named LookupSubnetPool
in the Go SDK.
public static class GetSubnetPool
{
public static Task<GetSubnetPoolResult> InvokeAsync(GetSubnetPoolArgs args, InvokeOptions? opts = null)
public static Output<GetSubnetPoolResult> Invoke(GetSubnetPoolInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetSubnetPoolResult> getSubnetPool(GetSubnetPoolArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: openstack:networking/getSubnetPool:getSubnetPool
arguments:
# arguments dictionary
The following arguments are supported:
- Address
Scope stringId - The Neutron address scope that subnetpools is assigned to.
- Default
Prefixlen int - The size of the subnetpool default prefix length.
- Default
Quota int - The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets.
- Description string
- The human-readable description for the subnetpool.
- Ip
Version int - The IP protocol version.
- Is
Default bool - Whether the subnetpool is default subnetpool or not.
- Max
Prefixlen int - The size of the subnetpool max prefix length.
- Min
Prefixlen int - The size of the subnetpool min prefix length.
- Name string
- The name of the subnetpool.
- Project
Id string - The owner of the subnetpool.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to retrieve a subnetpool id. If omitted, the
region
argument of the provider is used. - bool
- Whether this subnetpool is shared across all projects.
- List<string>
- The list of subnetpool tags to filter.
- Address
Scope stringId - The Neutron address scope that subnetpools is assigned to.
- Default
Prefixlen int - The size of the subnetpool default prefix length.
- Default
Quota int - The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets.
- Description string
- The human-readable description for the subnetpool.
- Ip
Version int - The IP protocol version.
- Is
Default bool - Whether the subnetpool is default subnetpool or not.
- Max
Prefixlen int - The size of the subnetpool max prefix length.
- Min
Prefixlen int - The size of the subnetpool min prefix length.
- Name string
- The name of the subnetpool.
- Project
Id string - The owner of the subnetpool.
- Region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to retrieve a subnetpool id. If omitted, the
region
argument of the provider is used. - bool
- Whether this subnetpool is shared across all projects.
- []string
- The list of subnetpool tags to filter.
- address
Scope StringId - The Neutron address scope that subnetpools is assigned to.
- default
Prefixlen Integer - The size of the subnetpool default prefix length.
- default
Quota Integer - The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets.
- description String
- The human-readable description for the subnetpool.
- ip
Version Integer - The IP protocol version.
- is
Default Boolean - Whether the subnetpool is default subnetpool or not.
- max
Prefixlen Integer - The size of the subnetpool max prefix length.
- min
Prefixlen Integer - The size of the subnetpool min prefix length.
- name String
- The name of the subnetpool.
- project
Id String - The owner of the subnetpool.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to retrieve a subnetpool id. If omitted, the
region
argument of the provider is used. - Boolean
- Whether this subnetpool is shared across all projects.
- List<String>
- The list of subnetpool tags to filter.
- address
Scope stringId - The Neutron address scope that subnetpools is assigned to.
- default
Prefixlen number - The size of the subnetpool default prefix length.
- default
Quota number - The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets.
- description string
- The human-readable description for the subnetpool.
- ip
Version number - The IP protocol version.
- is
Default boolean - Whether the subnetpool is default subnetpool or not.
- max
Prefixlen number - The size of the subnetpool max prefix length.
- min
Prefixlen number - The size of the subnetpool min prefix length.
- name string
- The name of the subnetpool.
- project
Id string - The owner of the subnetpool.
- region string
- The region in which to obtain the V2 Networking client.
A Networking client is needed to retrieve a subnetpool id. If omitted, the
region
argument of the provider is used. - boolean
- Whether this subnetpool is shared across all projects.
- string[]
- The list of subnetpool tags to filter.
- address_
scope_ strid - The Neutron address scope that subnetpools is assigned to.
- default_
prefixlen int - The size of the subnetpool default prefix length.
- default_
quota int - The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets.
- description str
- The human-readable description for the subnetpool.
- ip_
version int - The IP protocol version.
- is_
default bool - Whether the subnetpool is default subnetpool or not.
- max_
prefixlen int - The size of the subnetpool max prefix length.
- min_
prefixlen int - The size of the subnetpool min prefix length.
- name str
- The name of the subnetpool.
- project_
id str - The owner of the subnetpool.
- region str
- The region in which to obtain the V2 Networking client.
A Networking client is needed to retrieve a subnetpool id. If omitted, the
region
argument of the provider is used. - bool
- Whether this subnetpool is shared across all projects.
- Sequence[str]
- The list of subnetpool tags to filter.
- address
Scope StringId - The Neutron address scope that subnetpools is assigned to.
- default
Prefixlen Number - The size of the subnetpool default prefix length.
- default
Quota Number - The per-project quota on the prefix space that can be allocated from the subnetpool for project subnets.
- description String
- The human-readable description for the subnetpool.
- ip
Version Number - The IP protocol version.
- is
Default Boolean - Whether the subnetpool is default subnetpool or not.
- max
Prefixlen Number - The size of the subnetpool max prefix length.
- min
Prefixlen Number - The size of the subnetpool min prefix length.
- name String
- The name of the subnetpool.
- project
Id String - The owner of the subnetpool.
- region String
- The region in which to obtain the V2 Networking client.
A Networking client is needed to retrieve a subnetpool id. If omitted, the
region
argument of the provider is used. - Boolean
- Whether this subnetpool is shared across all projects.
- List<String>
- The list of subnetpool tags to filter.
getSubnetPool Result
The following output properties are available:
- Address
Scope stringId - See Argument Reference above.
- List<string>
- The set of string tags applied on the subnetpool.
- Created
At string - The time at which subnetpool was created.
- Default
Prefixlen int - See Argument Reference above.
- Default
Quota int - See Argument Reference above.
- Description string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Version int - The IP protocol version.
- Is
Default bool - See Argument Reference above.
- Max
Prefixlen int - See Argument Reference above.
- Min
Prefixlen int - See Argument Reference above.
- Name string
- See Argument Reference above.
- Prefixes List<string>
- See Argument Reference above.
- Project
Id string - See Argument Reference above.
- Region string
- See Argument Reference above.
- Revision
Number int - The revision number of the subnetpool.
- bool
- See Argument Reference above.
- Updated
At string - The time at which subnetpool was created.
- List<string>
- Address
Scope stringId - See Argument Reference above.
- []string
- The set of string tags applied on the subnetpool.
- Created
At string - The time at which subnetpool was created.
- Default
Prefixlen int - See Argument Reference above.
- Default
Quota int - See Argument Reference above.
- Description string
- See Argument Reference above.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ip
Version int - The IP protocol version.
- Is
Default bool - See Argument Reference above.
- Max
Prefixlen int - See Argument Reference above.
- Min
Prefixlen int - See Argument Reference above.
- Name string
- See Argument Reference above.
- Prefixes []string
- See Argument Reference above.
- Project
Id string - See Argument Reference above.
- Region string
- See Argument Reference above.
- Revision
Number int - The revision number of the subnetpool.
- bool
- See Argument Reference above.
- Updated
At string - The time at which subnetpool was created.
- []string
- address
Scope StringId - See Argument Reference above.
- List<String>
- The set of string tags applied on the subnetpool.
- created
At String - The time at which subnetpool was created.
- default
Prefixlen Integer - See Argument Reference above.
- default
Quota Integer - See Argument Reference above.
- description String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Version Integer - The IP protocol version.
- is
Default Boolean - See Argument Reference above.
- max
Prefixlen Integer - See Argument Reference above.
- min
Prefixlen Integer - See Argument Reference above.
- name String
- See Argument Reference above.
- prefixes List<String>
- See Argument Reference above.
- project
Id String - See Argument Reference above.
- region String
- See Argument Reference above.
- revision
Number Integer - The revision number of the subnetpool.
- Boolean
- See Argument Reference above.
- updated
At String - The time at which subnetpool was created.
- List<String>
- address
Scope stringId - See Argument Reference above.
- string[]
- The set of string tags applied on the subnetpool.
- created
At string - The time at which subnetpool was created.
- default
Prefixlen number - See Argument Reference above.
- default
Quota number - See Argument Reference above.
- description string
- See Argument Reference above.
- id string
- The provider-assigned unique ID for this managed resource.
- ip
Version number - The IP protocol version.
- is
Default boolean - See Argument Reference above.
- max
Prefixlen number - See Argument Reference above.
- min
Prefixlen number - See Argument Reference above.
- name string
- See Argument Reference above.
- prefixes string[]
- See Argument Reference above.
- project
Id string - See Argument Reference above.
- region string
- See Argument Reference above.
- revision
Number number - The revision number of the subnetpool.
- boolean
- See Argument Reference above.
- updated
At string - The time at which subnetpool was created.
- string[]
- address_
scope_ strid - See Argument Reference above.
- Sequence[str]
- The set of string tags applied on the subnetpool.
- created_
at str - The time at which subnetpool was created.
- default_
prefixlen int - See Argument Reference above.
- default_
quota int - See Argument Reference above.
- description str
- See Argument Reference above.
- id str
- The provider-assigned unique ID for this managed resource.
- ip_
version int - The IP protocol version.
- is_
default bool - See Argument Reference above.
- max_
prefixlen int - See Argument Reference above.
- min_
prefixlen int - See Argument Reference above.
- name str
- See Argument Reference above.
- prefixes Sequence[str]
- See Argument Reference above.
- project_
id str - See Argument Reference above.
- region str
- See Argument Reference above.
- revision_
number int - The revision number of the subnetpool.
- bool
- See Argument Reference above.
- updated_
at str - The time at which subnetpool was created.
- Sequence[str]
- address
Scope StringId - See Argument Reference above.
- List<String>
- The set of string tags applied on the subnetpool.
- created
At String - The time at which subnetpool was created.
- default
Prefixlen Number - See Argument Reference above.
- default
Quota Number - See Argument Reference above.
- description String
- See Argument Reference above.
- id String
- The provider-assigned unique ID for this managed resource.
- ip
Version Number - The IP protocol version.
- is
Default Boolean - See Argument Reference above.
- max
Prefixlen Number - See Argument Reference above.
- min
Prefixlen Number - See Argument Reference above.
- name String
- See Argument Reference above.
- prefixes List<String>
- See Argument Reference above.
- project
Id String - See Argument Reference above.
- region String
- See Argument Reference above.
- revision
Number Number - The revision number of the subnetpool.
- Boolean
- See Argument Reference above.
- updated
At String - The time at which subnetpool was created.
- List<String>
Package Details
- Repository
- OpenStack pulumi/pulumi-openstack
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
openstack
Terraform Provider.