Class UserSshKey
Provides a GitHub user's SSH key resource.
This resource allows you to add/remove SSH keys from your user account.
Example Usage
using System.IO;
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = new Github.UserSshKey("example", new Github.UserSshKeyArgs
{
Key = File.ReadAllText("~/.ssh/id_rsa.pub"),
Title = "example title",
});
}
}
Inherited Members
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public class UserSshKey : CustomResource
Constructors
View SourceUserSshKey(String, UserSshKeyArgs, CustomResourceOptions)
Create a UserSshKey resource with the given unique name, arguments, and options.
Declaration
public UserSshKey(string name, UserSshKeyArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| UserSshKeyArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceEtag
Declaration
public Output<string> Etag { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Key
The public SSH key to add to your GitHub account.
Declaration
public Output<string> Key { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Title
A descriptive name for the new key. e.g. Personal MacBook Air
Declaration
public Output<string> Title { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Url
The URL of the SSH key
Declaration
public Output<string> Url { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, UserSshKeyState, CustomResourceOptions)
Get an existing UserSshKey resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static UserSshKey Get(string name, Input<string> id, UserSshKeyState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| UserSshKeyState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| UserSshKey |