@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
95 lines (94 loc) • 3.66 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as outputs from "./types/output";
/**
* 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:
*
* ```typescript
* 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,
* })));
* ```
*/
export declare function getByoipPrefixResources(args: GetByoipPrefixResourcesArgs, opts?: pulumi.InvokeOptions): Promise<GetByoipPrefixResourcesResult>;
/**
* A collection of arguments for invoking getByoipPrefixResources.
*/
export interface GetByoipPrefixResourcesArgs {
/**
* The UUID of the BYOIP prefix to list addresses from.
*/
byoipPrefixUuid: string;
}
/**
* A collection of values returned by getByoipPrefixResources.
*/
export interface GetByoipPrefixResourcesResult {
/**
* A list of IP addresses allocated from the BYOIP prefix. Each address has the following attributes:
*/
readonly addresses: outputs.GetByoipPrefixResourcesAddress[];
readonly byoipPrefixUuid: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
}
/**
* 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:
*
* ```typescript
* 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,
* })));
* ```
*/
export declare function getByoipPrefixResourcesOutput(args: GetByoipPrefixResourcesOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetByoipPrefixResourcesResult>;
/**
* A collection of arguments for invoking getByoipPrefixResources.
*/
export interface GetByoipPrefixResourcesOutputArgs {
/**
* The UUID of the BYOIP prefix to list addresses from.
*/
byoipPrefixUuid: pulumi.Input<string>;
}