@pulumi/digitalocean
Version:
A Pulumi package for creating and managing DigitalOcean cloud resources.
135 lines (134 loc) • 3.72 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Get information on SSH Keys for use in other resources.
*
* This data source is useful if the SSH Keys in question are not managed by the provider or you need to
* utilize any of the SSH Keys' data.
*
* Note: You can use the `digitalocean.SshKey` data source to obtain metadata
* about a single SSH Key if you already know the unique `name` to retrieve.
*
* ## Example Usage
*
* For example, to find all SSH keys:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const keys = digitalocean.getSshKeys({
* sorts: [{
* key: "name",
* direction: "asc",
* }],
* });
* ```
*
* Or to find ones matching specific values:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const keys = digitalocean.getSshKeys({
* filters: [{
* key: "name",
* values: [
* "laptop",
* "desktop",
* ],
* }],
* });
* ```
*/
export declare function getSshKeys(args?: GetSshKeysArgs, opts?: pulumi.InvokeOptions): Promise<GetSshKeysResult>;
/**
* A collection of arguments for invoking getSshKeys.
*/
export interface GetSshKeysArgs {
/**
* Filter the results.
* The `filter` block is documented below.
*/
filters?: inputs.GetSshKeysFilter[];
/**
* Sort the results.
* The `sort` block is documented below.
*/
sorts?: inputs.GetSshKeysSort[];
}
/**
* A collection of values returned by getSshKeys.
*/
export interface GetSshKeysResult {
readonly filters?: outputs.GetSshKeysFilter[];
/**
* The provider-assigned unique ID for this managed resource.
*/
readonly id: string;
readonly sorts?: outputs.GetSshKeysSort[];
/**
* A list of SSH Keys. Each SSH Key has the following attributes:
*/
readonly sshKeys: outputs.GetSshKeysSshKey[];
}
/**
* Get information on SSH Keys for use in other resources.
*
* This data source is useful if the SSH Keys in question are not managed by the provider or you need to
* utilize any of the SSH Keys' data.
*
* Note: You can use the `digitalocean.SshKey` data source to obtain metadata
* about a single SSH Key if you already know the unique `name` to retrieve.
*
* ## Example Usage
*
* For example, to find all SSH keys:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const keys = digitalocean.getSshKeys({
* sorts: [{
* key: "name",
* direction: "asc",
* }],
* });
* ```
*
* Or to find ones matching specific values:
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as digitalocean from "@pulumi/digitalocean";
*
* const keys = digitalocean.getSshKeys({
* filters: [{
* key: "name",
* values: [
* "laptop",
* "desktop",
* ],
* }],
* });
* ```
*/
export declare function getSshKeysOutput(args?: GetSshKeysOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSshKeysResult>;
/**
* A collection of arguments for invoking getSshKeys.
*/
export interface GetSshKeysOutputArgs {
/**
* Filter the results.
* The `filter` block is documented below.
*/
filters?: pulumi.Input<pulumi.Input<inputs.GetSshKeysFilterArgs>[]>;
/**
* Sort the results.
* The `sort` block is documented below.
*/
sorts?: pulumi.Input<pulumi.Input<inputs.GetSshKeysSortArgs>[]>;
}