1. Packages
  2. Ibm Provider
  3. API Docs
  4. getIsVpcAddressPrefixes
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

ibm.getIsVpcAddressPrefixes

Explore with Pulumi AI

ibm logo
ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud

    Retrieve information of an existing IBM Cloud address prefix collection. For more information, about VPC address prefix, see address prefixes.

    Note: VPC infrastructure services are a regional specific based endpoint, by default targets to us-south. Please make sure to target right region in the provider block as shown in the provider.tf file, if VPC service is created in region other than us-south.

    provider.tf

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const example = ibm.getIsVpcAddressPrefixes({
        vpc: ibm_is_vpc.example.id,
        name: "example-address-prefix",
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    example = ibm.get_is_vpc_address_prefixes(vpc=ibm_is_vpc["example"]["id"],
        name="example-address-prefix")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetIsVpcAddressPrefixes(ctx, &ibm.GetIsVpcAddressPrefixesArgs{
    			Vpc:  ibm_is_vpc.Example.Id,
    			Name: pulumi.StringRef("example-address-prefix"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Ibm.GetIsVpcAddressPrefixes.Invoke(new()
        {
            Vpc = ibm_is_vpc.Example.Id,
            Name = "example-address-prefix",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetIsVpcAddressPrefixesArgs;
    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 example = IbmFunctions.getIsVpcAddressPrefixes(GetIsVpcAddressPrefixesArgs.builder()
                .vpc(ibm_is_vpc.example().id())
                .name("example-address-prefix")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: ibm:getIsVpcAddressPrefixes
          arguments:
            vpc: ${ibm_is_vpc.example.id}
            name: example-address-prefix
    

    Using getIsVpcAddressPrefixes

    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 getIsVpcAddressPrefixes(args: GetIsVpcAddressPrefixesArgs, opts?: InvokeOptions): Promise<GetIsVpcAddressPrefixesResult>
    function getIsVpcAddressPrefixesOutput(args: GetIsVpcAddressPrefixesOutputArgs, opts?: InvokeOptions): Output<GetIsVpcAddressPrefixesResult>
    def get_is_vpc_address_prefixes(id: Optional[str] = None,
                                    name: Optional[str] = None,
                                    vpc: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetIsVpcAddressPrefixesResult
    def get_is_vpc_address_prefixes_output(id: Optional[pulumi.Input[str]] = None,
                                    name: Optional[pulumi.Input[str]] = None,
                                    vpc: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetIsVpcAddressPrefixesResult]
    func GetIsVpcAddressPrefixes(ctx *Context, args *GetIsVpcAddressPrefixesArgs, opts ...InvokeOption) (*GetIsVpcAddressPrefixesResult, error)
    func GetIsVpcAddressPrefixesOutput(ctx *Context, args *GetIsVpcAddressPrefixesOutputArgs, opts ...InvokeOption) GetIsVpcAddressPrefixesResultOutput

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

    public static class GetIsVpcAddressPrefixes 
    {
        public static Task<GetIsVpcAddressPrefixesResult> InvokeAsync(GetIsVpcAddressPrefixesArgs args, InvokeOptions? opts = null)
        public static Output<GetIsVpcAddressPrefixesResult> Invoke(GetIsVpcAddressPrefixesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetIsVpcAddressPrefixesResult> getIsVpcAddressPrefixes(GetIsVpcAddressPrefixesArgs args, InvokeOptions options)
    public static Output<GetIsVpcAddressPrefixesResult> getIsVpcAddressPrefixes(GetIsVpcAddressPrefixesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getIsVpcAddressPrefixes:getIsVpcAddressPrefixes
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Vpc string
    The VPC identifier.
    Id string
    (String) The unique identifier of the AddressPrefixCollection.
    Name string
    The unique user-defined name within the VPC the address prefix.
    Vpc string
    The VPC identifier.
    Id string
    (String) The unique identifier of the AddressPrefixCollection.
    Name string
    The unique user-defined name within the VPC the address prefix.
    vpc String
    The VPC identifier.
    id String
    (String) The unique identifier of the AddressPrefixCollection.
    name String
    The unique user-defined name within the VPC the address prefix.
    vpc string
    The VPC identifier.
    id string
    (String) The unique identifier of the AddressPrefixCollection.
    name string
    The unique user-defined name within the VPC the address prefix.
    vpc str
    The VPC identifier.
    id str
    (String) The unique identifier of the AddressPrefixCollection.
    name str
    The unique user-defined name within the VPC the address prefix.
    vpc String
    The VPC identifier.
    id String
    (String) The unique identifier of the AddressPrefixCollection.
    name String
    The unique user-defined name within the VPC the address prefix.

    getIsVpcAddressPrefixes Result

    The following output properties are available:

    AddressPrefixes List<GetIsVpcAddressPrefixesAddressPrefix>
    (List) Collection of the address prefixes.
    Id string
    (String) The unique identifier of the AddressPrefixCollection.
    Vpc string
    Name string
    (String) The globally unique name for this zone.
    AddressPrefixes []GetIsVpcAddressPrefixesAddressPrefix
    (List) Collection of the address prefixes.
    Id string
    (String) The unique identifier of the AddressPrefixCollection.
    Vpc string
    Name string
    (String) The globally unique name for this zone.
    addressPrefixes List<GetIsVpcAddressPrefixesAddressPrefix>
    (List) Collection of the address prefixes.
    id String
    (String) The unique identifier of the AddressPrefixCollection.
    vpc String
    name String
    (String) The globally unique name for this zone.
    addressPrefixes GetIsVpcAddressPrefixesAddressPrefix[]
    (List) Collection of the address prefixes.
    id string
    (String) The unique identifier of the AddressPrefixCollection.
    vpc string
    name string
    (String) The globally unique name for this zone.
    address_prefixes Sequence[GetIsVpcAddressPrefixesAddressPrefix]
    (List) Collection of the address prefixes.
    id str
    (String) The unique identifier of the AddressPrefixCollection.
    vpc str
    name str
    (String) The globally unique name for this zone.
    addressPrefixes List<Property Map>
    (List) Collection of the address prefixes.
    id String
    (String) The unique identifier of the AddressPrefixCollection.
    vpc String
    name String
    (String) The globally unique name for this zone.

    Supporting Types

    GetIsVpcAddressPrefixesAddressPrefix

    Cidr string
    (String) The CIDR block for this prefix.
    CreatedAt string
    (Timestamp) The date and time that the prefix was created.
    HasSubnets bool
    (String) Indicates whether subnets exist with addresses from this prefix.
    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier of the AddressPrefixCollection.
    IsDefault bool
    (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
    Name string
    The unique user-defined name within the VPC the address prefix.
    Zones List<GetIsVpcAddressPrefixesAddressPrefixZone>
    (List) The zone this address prefix resides in.
    Cidr string
    (String) The CIDR block for this prefix.
    CreatedAt string
    (Timestamp) The date and time that the prefix was created.
    HasSubnets bool
    (String) Indicates whether subnets exist with addresses from this prefix.
    Href string
    (String) The URL for this zone.
    Id string
    (String) The unique identifier of the AddressPrefixCollection.
    IsDefault bool
    (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
    Name string
    The unique user-defined name within the VPC the address prefix.
    Zones []GetIsVpcAddressPrefixesAddressPrefixZone
    (List) The zone this address prefix resides in.
    cidr String
    (String) The CIDR block for this prefix.
    createdAt String
    (Timestamp) The date and time that the prefix was created.
    hasSubnets Boolean
    (String) Indicates whether subnets exist with addresses from this prefix.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier of the AddressPrefixCollection.
    isDefault Boolean
    (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
    name String
    The unique user-defined name within the VPC the address prefix.
    zones List<GetIsVpcAddressPrefixesAddressPrefixZone>
    (List) The zone this address prefix resides in.
    cidr string
    (String) The CIDR block for this prefix.
    createdAt string
    (Timestamp) The date and time that the prefix was created.
    hasSubnets boolean
    (String) Indicates whether subnets exist with addresses from this prefix.
    href string
    (String) The URL for this zone.
    id string
    (String) The unique identifier of the AddressPrefixCollection.
    isDefault boolean
    (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
    name string
    The unique user-defined name within the VPC the address prefix.
    zones GetIsVpcAddressPrefixesAddressPrefixZone[]
    (List) The zone this address prefix resides in.
    cidr str
    (String) The CIDR block for this prefix.
    created_at str
    (Timestamp) The date and time that the prefix was created.
    has_subnets bool
    (String) Indicates whether subnets exist with addresses from this prefix.
    href str
    (String) The URL for this zone.
    id str
    (String) The unique identifier of the AddressPrefixCollection.
    is_default bool
    (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
    name str
    The unique user-defined name within the VPC the address prefix.
    zones Sequence[GetIsVpcAddressPrefixesAddressPrefixZone]
    (List) The zone this address prefix resides in.
    cidr String
    (String) The CIDR block for this prefix.
    createdAt String
    (Timestamp) The date and time that the prefix was created.
    hasSubnets Boolean
    (String) Indicates whether subnets exist with addresses from this prefix.
    href String
    (String) The URL for this zone.
    id String
    (String) The unique identifier of the AddressPrefixCollection.
    isDefault Boolean
    (String) Indicates whether this is the default prefix for this zone in this VPC. If a default prefix was automatically created when the VPC was created, the prefix is automatically named using a hyphenated list of randomly-selected words, but may be updated with a user-specified name.
    name String
    The unique user-defined name within the VPC the address prefix.
    zones List<Property Map>
    (List) The zone this address prefix resides in.

    GetIsVpcAddressPrefixesAddressPrefixZone

    Href string
    (String) The URL for this zone.
    Name string
    The unique user-defined name within the VPC the address prefix.
    Href string
    (String) The URL for this zone.
    Name string
    The unique user-defined name within the VPC the address prefix.
    href String
    (String) The URL for this zone.
    name String
    The unique user-defined name within the VPC the address prefix.
    href string
    (String) The URL for this zone.
    name string
    The unique user-defined name within the VPC the address prefix.
    href str
    (String) The URL for this zone.
    name str
    The unique user-defined name within the VPC the address prefix.
    href String
    (String) The URL for this zone.
    name String
    The unique user-defined name within the VPC the address prefix.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.78.0 published on Wednesday, Apr 30, 2025 by ibm-cloud