@equinix-labs/pulumi-equinix
Version:
A Pulumi package for creating and managing equinix cloud resources.
84 lines • 4.14 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.SshKey = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Resource `equinix.networkedge.SshKey` allows creation and management of Equinix Network Edge SSH keys.
*
* ## Example Usage
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as equinix from "@equinix-labs/pulumi-equinix";
*
* const john = new equinix.networkedge.SshKey("john", {
* name: "johnKent",
* publicKey: " ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDpXGdxljAyPp9vH97436U171cX 2gRkfPnpL8ebrk7ZBeeIpdjtd8mYpXf6fOI0o91TQXZTYtjABzeRgg6/m9hsMOnTHjzWpFyuj/hiPu iie1WtT4NffSH1ALQFX/azouBLmdNiYFMLfEVPZleergAqsYOHGCiQuR6Qh5j0yc5Wx+LKxiRZyjsS qo+EB8V6xBXi2i5PDJXK+dYG8YU9vdNeQdB84HvTWcGEnLR5w7pgC74pBVwzs3oWLy+3jWS0TKKtfl mryeFRufXq87gEkC1MOWX88uQgjyCsemuhPdN++2WS57gu7vcqCMwMDZa7dukRS3JANBtbs7qQhp9N w2PB4q6tohqUnSDxNjCqcoGeMNg/0kHeZcoVuznsjOrIDt0HgUApflkbtw1DP7Epfc2MJ0anf5GizM 8UjMYiXEvv2U/qu8Vb7d5bxAshXM5nh67NSrgst9YzSSodjUCnFQkniz6KLrTkX6c2y2gJ5c9tWhg5 SPkAc8OqLrmIwf5jGoHGh6eUJy7AtMcwE3iUpbrLw8EEoZDoDXkzh+RbOtSNKXWV4EAXsIhjQusCOW WQnuAHCy9N4Td0Sntzu/xhCZ8xN0oO67Cqlsk98xSRLXeg21PuuhOYJw0DLF6L68zU2OO0RzqoNq/F jIsltSUJPAIfYKL0yEefeNWOXSrasI1ezw== John.Kent@company.com\n",
* type: "RSA",
* projectId: "a86d7112-d740-4758-9c9c-31e66373746b",
* });
* ```
*
* ## Import
*
* This resource can be imported using an existing ID:
*
* ```sh
* $ pulumi import equinix:networkedge/sshKey:SshKey example {existing_id}
* ```
*/
class SshKey extends pulumi.CustomResource {
/**
* Get an existing SshKey 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, id, state, opts) {
return new SshKey(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of SshKey. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === SshKey.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["projectId"] = state ? state.projectId : undefined;
resourceInputs["publicKey"] = state ? state.publicKey : undefined;
resourceInputs["type"] = state ? state.type : undefined;
resourceInputs["uuid"] = state ? state.uuid : undefined;
}
else {
const args = argsOrState;
if ((!args || args.publicKey === undefined) && !opts.urn) {
throw new Error("Missing required property 'publicKey'");
}
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["projectId"] = args ? args.projectId : undefined;
resourceInputs["publicKey"] = args ? args.publicKey : undefined;
resourceInputs["type"] = args ? args.type : undefined;
resourceInputs["uuid"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(SshKey.__pulumiType, name, resourceInputs, opts);
}
}
exports.SshKey = SshKey;
/** @internal */
SshKey.__pulumiType = 'equinix:networkedge/sshKey:SshKey';
//# sourceMappingURL=sshKey.js.map