1. Packages
  2. DigitalOcean Provider
  3. API Docs
  4. getByoipPrefixResources
DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi
digitalocean logo
DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi

    Get information about IP addresses that have been already assigned from a BYOIP (Bring Your Own IP) prefix. This data source provides a list of all IP addresses that are currently assigned to resources from a specific BYOIP prefix.

    Note: This data source only lists IPs that are already assigned to resources (like Droplets). To allocate new IPs from the BYOIP prefix, you need to use digitalocean.ReservedIpAssignment resource.

    Example Usage

    List all assigned IP addresses from a BYOIP prefix:

    import * as pulumi from "@pulumi/pulumi";
    import * as digitalocean from "@pulumi/digitalocean";
    
    const example = digitalocean.getByoipPrefix({
        uuid: "506f78a4-e098-11e5-ad9f-000f53306ae1",
    });
    const exampleGetByoipPrefixResources = example.then(example => digitalocean.getByoipPrefixResources({
        byoipPrefixUuid: example.uuid,
    }));
    export const assignedByoipIps = exampleGetByoipPrefixResources.then(exampleGetByoipPrefixResources => .map(addr => ({
        ip: addr.ipAddress,
        region: addr.region,
        assigned: addr.assignedAt,
    })));
    
    import pulumi
    import pulumi_digitalocean as digitalocean
    
    example = digitalocean.get_byoip_prefix(uuid="506f78a4-e098-11e5-ad9f-000f53306ae1")
    example_get_byoip_prefix_resources = digitalocean.get_byoip_prefix_resources(byoip_prefix_uuid=example.uuid)
    pulumi.export("assignedByoipIps", [{
        "ip": addr.ip_address,
        "region": addr.region,
        "assigned": addr.assigned_at,
    } for addr in example_get_byoip_prefix_resources.addresses])
    
    Example coming soon!
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using DigitalOcean = Pulumi.DigitalOcean;
    
    return await Deployment.RunAsync(() => 
    {
        var example = DigitalOcean.GetByoipPrefix.Invoke(new()
        {
            Uuid = "506f78a4-e098-11e5-ad9f-000f53306ae1",
        });
    
        var exampleGetByoipPrefixResources = DigitalOcean.GetByoipPrefixResources.Invoke(new()
        {
            ByoipPrefixUuid = example.Apply(getByoipPrefixResult => getByoipPrefixResult.Uuid),
        });
    
        return new Dictionary<string, object?>
        {
            ["assignedByoipIps"] = .Select(addr => 
            {
                return 
                {
                    { "ip", addr.IpAddress },
                    { "region", addr.Region },
                    { "assigned", addr.AssignedAt },
                };
            }).ToList(),
        };
    });
    
    Example coming soon!
    
    Example coming soon!
    

    Using getByoipPrefixResources

    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 getByoipPrefixResources(args: GetByoipPrefixResourcesArgs, opts?: InvokeOptions): Promise<GetByoipPrefixResourcesResult>
    function getByoipPrefixResourcesOutput(args: GetByoipPrefixResourcesOutputArgs, opts?: InvokeOptions): Output<GetByoipPrefixResourcesResult>
    def get_byoip_prefix_resources(byoip_prefix_uuid: Optional[str] = None,
                                   opts: Optional[InvokeOptions] = None) -> GetByoipPrefixResourcesResult
    def get_byoip_prefix_resources_output(byoip_prefix_uuid: Optional[pulumi.Input[str]] = None,
                                   opts: Optional[InvokeOptions] = None) -> Output[GetByoipPrefixResourcesResult]
    func GetByoipPrefixResources(ctx *Context, args *GetByoipPrefixResourcesArgs, opts ...InvokeOption) (*GetByoipPrefixResourcesResult, error)
    func GetByoipPrefixResourcesOutput(ctx *Context, args *GetByoipPrefixResourcesOutputArgs, opts ...InvokeOption) GetByoipPrefixResourcesResultOutput

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

    public static class GetByoipPrefixResources 
    {
        public static Task<GetByoipPrefixResourcesResult> InvokeAsync(GetByoipPrefixResourcesArgs args, InvokeOptions? opts = null)
        public static Output<GetByoipPrefixResourcesResult> Invoke(GetByoipPrefixResourcesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetByoipPrefixResourcesResult> getByoipPrefixResources(GetByoipPrefixResourcesArgs args, InvokeOptions options)
    public static Output<GetByoipPrefixResourcesResult> getByoipPrefixResources(GetByoipPrefixResourcesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: digitalocean:index/getByoipPrefixResources:getByoipPrefixResources
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ByoipPrefixUuid string
    The UUID of the BYOIP prefix to list addresses from.
    ByoipPrefixUuid string
    The UUID of the BYOIP prefix to list addresses from.
    byoipPrefixUuid String
    The UUID of the BYOIP prefix to list addresses from.
    byoipPrefixUuid string
    The UUID of the BYOIP prefix to list addresses from.
    byoip_prefix_uuid str
    The UUID of the BYOIP prefix to list addresses from.
    byoipPrefixUuid String
    The UUID of the BYOIP prefix to list addresses from.

    getByoipPrefixResources Result

    The following output properties are available:

    Addresses List<Pulumi.DigitalOcean.Outputs.GetByoipPrefixResourcesAddress>
    A list of IP addresses allocated from the BYOIP prefix. Each address has the following attributes:
    ByoipPrefixUuid string
    Id string
    The provider-assigned unique ID for this managed resource.
    Addresses []GetByoipPrefixResourcesAddress
    A list of IP addresses allocated from the BYOIP prefix. Each address has the following attributes:
    ByoipPrefixUuid string
    Id string
    The provider-assigned unique ID for this managed resource.
    addresses List<GetByoipPrefixResourcesAddress>
    A list of IP addresses allocated from the BYOIP prefix. Each address has the following attributes:
    byoipPrefixUuid String
    id String
    The provider-assigned unique ID for this managed resource.
    addresses GetByoipPrefixResourcesAddress[]
    A list of IP addresses allocated from the BYOIP prefix. Each address has the following attributes:
    byoipPrefixUuid string
    id string
    The provider-assigned unique ID for this managed resource.
    addresses Sequence[GetByoipPrefixResourcesAddress]
    A list of IP addresses allocated from the BYOIP prefix. Each address has the following attributes:
    byoip_prefix_uuid str
    id str
    The provider-assigned unique ID for this managed resource.
    addresses List<Property Map>
    A list of IP addresses allocated from the BYOIP prefix. Each address has the following attributes:
    byoipPrefixUuid String
    id String
    The provider-assigned unique ID for this managed resource.

    Supporting Types

    GetByoipPrefixResourcesAddress

    AssignedAt string
    The timestamp when the IP was assigned.
    Id int
    The unique identifier of the IP address allocation.
    IpAddress string
    The IP address.
    Region string
    The region where the IP is allocated.
    AssignedAt string
    The timestamp when the IP was assigned.
    Id int
    The unique identifier of the IP address allocation.
    IpAddress string
    The IP address.
    Region string
    The region where the IP is allocated.
    assignedAt String
    The timestamp when the IP was assigned.
    id Integer
    The unique identifier of the IP address allocation.
    ipAddress String
    The IP address.
    region String
    The region where the IP is allocated.
    assignedAt string
    The timestamp when the IP was assigned.
    id number
    The unique identifier of the IP address allocation.
    ipAddress string
    The IP address.
    region string
    The region where the IP is allocated.
    assigned_at str
    The timestamp when the IP was assigned.
    id int
    The unique identifier of the IP address allocation.
    ip_address str
    The IP address.
    region str
    The region where the IP is allocated.
    assignedAt String
    The timestamp when the IP was assigned.
    id Number
    The unique identifier of the IP address allocation.
    ipAddress String
    The IP address.
    region String
    The region where the IP is allocated.

    Package Details

    Repository
    DigitalOcean pulumi/pulumi-digitalocean
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the digitalocean Terraform Provider.
    digitalocean logo
    DigitalOcean v4.56.0 published on Monday, Dec 22, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate