1. Packages
  2. OpenStack
  3. API Docs
  4. networking
  5. getSubnetPool
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

openstack.networking.getSubnetPool

Explore with Pulumi AI

openstack logo
OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi

    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/v3/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:

    AddressScopeId string
    The Neutron address scope that subnetpools is assigned to.
    DefaultPrefixlen int
    The size of the subnetpool default prefix length.
    DefaultQuota 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.
    IpVersion int
    The IP protocol version.
    IsDefault bool
    Whether the subnetpool is default subnetpool or not.
    MaxPrefixlen int
    The size of the subnetpool max prefix length.
    MinPrefixlen int
    The size of the subnetpool min prefix length.
    Name string
    The name of the subnetpool.
    ProjectId 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.
    Shared bool
    Whether this subnetpool is shared across all projects.
    Tags List<string>
    The list of subnetpool tags to filter.
    AddressScopeId string
    The Neutron address scope that subnetpools is assigned to.
    DefaultPrefixlen int
    The size of the subnetpool default prefix length.
    DefaultQuota 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.
    IpVersion int
    The IP protocol version.
    IsDefault bool
    Whether the subnetpool is default subnetpool or not.
    MaxPrefixlen int
    The size of the subnetpool max prefix length.
    MinPrefixlen int
    The size of the subnetpool min prefix length.
    Name string
    The name of the subnetpool.
    ProjectId 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.
    Shared bool
    Whether this subnetpool is shared across all projects.
    Tags []string
    The list of subnetpool tags to filter.
    addressScopeId String
    The Neutron address scope that subnetpools is assigned to.
    defaultPrefixlen Integer
    The size of the subnetpool default prefix length.
    defaultQuota 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.
    ipVersion Integer
    The IP protocol version.
    isDefault Boolean
    Whether the subnetpool is default subnetpool or not.
    maxPrefixlen Integer
    The size of the subnetpool max prefix length.
    minPrefixlen Integer
    The size of the subnetpool min prefix length.
    name String
    The name of the subnetpool.
    projectId 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.
    shared Boolean
    Whether this subnetpool is shared across all projects.
    tags List<String>
    The list of subnetpool tags to filter.
    addressScopeId string
    The Neutron address scope that subnetpools is assigned to.
    defaultPrefixlen number
    The size of the subnetpool default prefix length.
    defaultQuota 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.
    ipVersion number
    The IP protocol version.
    isDefault boolean
    Whether the subnetpool is default subnetpool or not.
    maxPrefixlen number
    The size of the subnetpool max prefix length.
    minPrefixlen number
    The size of the subnetpool min prefix length.
    name string
    The name of the subnetpool.
    projectId 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.
    shared boolean
    Whether this subnetpool is shared across all projects.
    tags string[]
    The list of subnetpool tags to filter.
    address_scope_id str
    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.
    shared bool
    Whether this subnetpool is shared across all projects.
    tags Sequence[str]
    The list of subnetpool tags to filter.
    addressScopeId String
    The Neutron address scope that subnetpools is assigned to.
    defaultPrefixlen Number
    The size of the subnetpool default prefix length.
    defaultQuota 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.
    ipVersion Number
    The IP protocol version.
    isDefault Boolean
    Whether the subnetpool is default subnetpool or not.
    maxPrefixlen Number
    The size of the subnetpool max prefix length.
    minPrefixlen Number
    The size of the subnetpool min prefix length.
    name String
    The name of the subnetpool.
    projectId 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.
    shared Boolean
    Whether this subnetpool is shared across all projects.
    tags List<String>
    The list of subnetpool tags to filter.

    getSubnetPool Result

    The following output properties are available:

    AddressScopeId string
    See Argument Reference above.
    AllTags List<string>
    The set of string tags applied on the subnetpool.
    CreatedAt string
    The time at which subnetpool was created.
    DefaultPrefixlen int
    See Argument Reference above.
    DefaultQuota int
    See Argument Reference above.
    Description string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpVersion int
    The IP protocol version.
    IsDefault bool
    See Argument Reference above.
    MaxPrefixlen int
    See Argument Reference above.
    MinPrefixlen int
    See Argument Reference above.
    Name string
    See Argument Reference above.
    Prefixes List<string>
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    Region string
    See Argument Reference above.
    RevisionNumber int
    The revision number of the subnetpool.
    Shared bool
    See Argument Reference above.
    UpdatedAt string
    The time at which subnetpool was created.
    Tags List<string>
    AddressScopeId string
    See Argument Reference above.
    AllTags []string
    The set of string tags applied on the subnetpool.
    CreatedAt string
    The time at which subnetpool was created.
    DefaultPrefixlen int
    See Argument Reference above.
    DefaultQuota int
    See Argument Reference above.
    Description string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    IpVersion int
    The IP protocol version.
    IsDefault bool
    See Argument Reference above.
    MaxPrefixlen int
    See Argument Reference above.
    MinPrefixlen int
    See Argument Reference above.
    Name string
    See Argument Reference above.
    Prefixes []string
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    Region string
    See Argument Reference above.
    RevisionNumber int
    The revision number of the subnetpool.
    Shared bool
    See Argument Reference above.
    UpdatedAt string
    The time at which subnetpool was created.
    Tags []string
    addressScopeId String
    See Argument Reference above.
    allTags List<String>
    The set of string tags applied on the subnetpool.
    createdAt String
    The time at which subnetpool was created.
    defaultPrefixlen Integer
    See Argument Reference above.
    defaultQuota Integer
    See Argument Reference above.
    description String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    ipVersion Integer
    The IP protocol version.
    isDefault Boolean
    See Argument Reference above.
    maxPrefixlen Integer
    See Argument Reference above.
    minPrefixlen Integer
    See Argument Reference above.
    name String
    See Argument Reference above.
    prefixes List<String>
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    region String
    See Argument Reference above.
    revisionNumber Integer
    The revision number of the subnetpool.
    shared Boolean
    See Argument Reference above.
    updatedAt String
    The time at which subnetpool was created.
    tags List<String>
    addressScopeId string
    See Argument Reference above.
    allTags string[]
    The set of string tags applied on the subnetpool.
    createdAt string
    The time at which subnetpool was created.
    defaultPrefixlen number
    See Argument Reference above.
    defaultQuota number
    See Argument Reference above.
    description string
    See Argument Reference above.
    id string
    The provider-assigned unique ID for this managed resource.
    ipVersion number
    The IP protocol version.
    isDefault boolean
    See Argument Reference above.
    maxPrefixlen number
    See Argument Reference above.
    minPrefixlen number
    See Argument Reference above.
    name string
    See Argument Reference above.
    prefixes string[]
    See Argument Reference above.
    projectId string
    See Argument Reference above.
    region string
    See Argument Reference above.
    revisionNumber number
    The revision number of the subnetpool.
    shared boolean
    See Argument Reference above.
    updatedAt string
    The time at which subnetpool was created.
    tags string[]
    address_scope_id str
    See Argument Reference above.
    all_tags 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.
    shared bool
    See Argument Reference above.
    updated_at str
    The time at which subnetpool was created.
    tags Sequence[str]
    addressScopeId String
    See Argument Reference above.
    allTags List<String>
    The set of string tags applied on the subnetpool.
    createdAt String
    The time at which subnetpool was created.
    defaultPrefixlen Number
    See Argument Reference above.
    defaultQuota Number
    See Argument Reference above.
    description String
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    ipVersion Number
    The IP protocol version.
    isDefault Boolean
    See Argument Reference above.
    maxPrefixlen Number
    See Argument Reference above.
    minPrefixlen Number
    See Argument Reference above.
    name String
    See Argument Reference above.
    prefixes List<String>
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    region String
    See Argument Reference above.
    revisionNumber Number
    The revision number of the subnetpool.
    shared Boolean
    See Argument Reference above.
    updatedAt String
    The time at which subnetpool was created.
    tags List<String>

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v3.15.2 published on Friday, Mar 29, 2024 by Pulumi