@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
123 lines (122 loc) • 3.74 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* ## Example Usage
*
* Get the 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",
* });
* ```
*
* List 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 byoipInfo = {
* prefix: example.then(example => example.prefix),
* region: example.then(example => example.region),
* status: example.then(example => example.status),
* assignedCount: exampleGetByoipPrefixResources.then(exampleGetByoipPrefixResources => exampleGetByoipPrefixResources.addresses).length,
* };
* ```
*/
export declare function getByoipPrefix(args: GetByoipPrefixArgs, opts?: pulumi.InvokeOptions): Promise<GetByoipPrefixResult>;
/**
* A collection of arguments for invoking getByoipPrefix.
*/
export interface GetByoipPrefixArgs {
/**
* The UUID of the BYOIP prefix.
*/
uuid: string;
}
/**
* A collection of values returned by getByoipPrefix.
*/
export interface GetByoipPrefixResult {
/**
* A boolean indicating whether the prefix is currently being advertised.
*/
readonly advertised: boolean;
/**
* The reason for failure if the status is "failed".
*/
readonly failureReason: string;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* The CIDR notation of the prefix (e.g., "192.0.2.0/24").
*/
readonly prefix: string;
/**
* The DigitalOcean region where the prefix is deployed.
*/
readonly region: string;
/**
* The current status of the BYOIP prefix (e.g., "verified", "pending", "failed").
*/
readonly status: string;
/**
* The UUID of the BYOIP prefix.
*/
readonly uuid: string;
}
/**
* ## Example Usage
*
* Get the 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",
* });
* ```
*
* List 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 byoipInfo = {
* prefix: example.then(example => example.prefix),
* region: example.then(example => example.region),
* status: example.then(example => example.status),
* assignedCount: exampleGetByoipPrefixResources.then(exampleGetByoipPrefixResources => exampleGetByoipPrefixResources.addresses).length,
* };
* ```
*/
export declare function getByoipPrefixOutput(args: GetByoipPrefixOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetByoipPrefixResult>;
/**
* A collection of arguments for invoking getByoipPrefix.
*/
export interface GetByoipPrefixOutputArgs {
/**
* The UUID of the BYOIP prefix.
*/
uuid: pulumi.Input<string>;
}