@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
110 lines (109 loc) • 3.21 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Get information on a tag. This data source provides the name as configured on
* your DigitalOcean account. This is useful if the tag name in question is not
* managed by the provider or you need validate if the tag exists in the account.
*
* An error is triggered if the provided tag name does not exist.
*
* ## Example Usage
*
* Get the tag:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const example = digitalocean.getTag({
* name: "example",
* });
* const exampleDroplet = new digitalocean.Droplet("example", {
* image: "ubuntu-18-04-x64",
* name: "example-1",
* region: digitalocean.Region.NYC2,
* size: digitalocean.DropletSlug.DropletS1VCPU1GB,
* tags: [example.then(example => example.name)],
* });
* ```
*/
export declare function getTag(args: GetTagArgs, opts?: pulumi.InvokeOptions): Promise<GetTagResult>;
/**
* A collection of arguments for invoking getTag.
*/
export interface GetTagArgs {
/**
* The name of the tag.
*/
name: string;
}
/**
* A collection of values returned by getTag.
*/
export interface GetTagResult {
/**
* A count of the database clusters that the tag is applied to.
*/
readonly databasesCount: number;
/**
* A count of the Droplets the tag is applied to.
*/
readonly dropletsCount: number;
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
/**
* A count of the images that the tag is applied to.
*/
readonly imagesCount: number;
readonly name: string;
/**
* A count of the total number of resources that the tag is applied to.
*/
readonly totalResourceCount: number;
/**
* A count of the volume snapshots that the tag is applied to.
*/
readonly volumeSnapshotsCount: number;
/**
* A count of the volumes that the tag is applied to.
*/
readonly volumesCount: number;
}
/**
* Get information on a tag. This data source provides the name as configured on
* your DigitalOcean account. This is useful if the tag name in question is not
* managed by the provider or you need validate if the tag exists in the account.
*
* An error is triggered if the provided tag name does not exist.
*
* ## Example Usage
*
* Get the tag:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const example = digitalocean.getTag({
* name: "example",
* });
* const exampleDroplet = new digitalocean.Droplet("example", {
* image: "ubuntu-18-04-x64",
* name: "example-1",
* region: digitalocean.Region.NYC2,
* size: digitalocean.DropletSlug.DropletS1VCPU1GB,
* tags: [example.then(example => example.name)],
* });
* ```
*/
export declare function getTagOutput(args: GetTagOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetTagResult>;
/**
* A collection of arguments for invoking getTag.
*/
export interface GetTagOutputArgs {
/**
* The name of the tag.
*/
name: pulumi.Input<string>;
}