@pulumi/github
Version:
A Pulumi package for creating and managing github cloud resources.
99 lines (98 loc) • 3.18 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* Provides a GitHub user's SSH key resource.
*
* This resource allows you to add/remove SSH keys from your user account.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as github from "@pulumi/github";
* import * as std from "@pulumi/std";
*
* const example = new github.UserSshKey("example", {
* title: "example title",
* key: std.file({
* input: "~/.ssh/id_rsa.pub",
* }).then(invoke => invoke.result),
* });
* ```
*
* ## Import
*
* SSH keys can be imported using their ID e.g.
*
* ```sh
* $ pulumi import github:index/userSshKey:UserSshKey example 1234567
* ```
*/
export declare class UserSshKey extends pulumi.CustomResource {
/**
* Get an existing UserSshKey resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: UserSshKeyState, opts?: pulumi.CustomResourceOptions): UserSshKey;
/**
* Returns true if the given object is an instance of UserSshKey. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is UserSshKey;
readonly etag: pulumi.Output<string>;
/**
* The public SSH key to add to your GitHub account.
*/
readonly key: pulumi.Output<string>;
/**
* A descriptive name for the new key. e.g. `Personal MacBook Air`
*/
readonly title: pulumi.Output<string>;
/**
* The URL of the SSH key
*/
readonly url: pulumi.Output<string>;
/**
* Create a UserSshKey resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: UserSshKeyArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering UserSshKey resources.
*/
export interface UserSshKeyState {
etag?: pulumi.Input<string>;
/**
* The public SSH key to add to your GitHub account.
*/
key?: pulumi.Input<string>;
/**
* A descriptive name for the new key. e.g. `Personal MacBook Air`
*/
title?: pulumi.Input<string>;
/**
* The URL of the SSH key
*/
url?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a UserSshKey resource.
*/
export interface UserSshKeyArgs {
/**
* The public SSH key to add to your GitHub account.
*/
key: pulumi.Input<string>;
/**
* A descriptive name for the new key. e.g. `Personal MacBook Air`
*/
title: pulumi.Input<string>;
}