@pulumi/aws-native
Version:
The Pulumi AWS Cloud Control Provider enables you to build, deploy, and manage [any AWS resource that's supported by the AWS Cloud Control API](https://github.com/pulumi/pulumi-aws-native/blob/master/provider/cmd/pulumi-gen-aws-native/supported-types.txt)
40 lines • 3.05 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.getKeyPairOutput = exports.getKeyPair = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Specifies a key pair for use with an EC2long instance as follows:
* + To import an existing key pair, include the ``PublicKeyMaterial`` property.
* + To create a new key pair, omit the ``PublicKeyMaterial`` property.
*
* When you import an existing key pair, you specify the public key material for the key. We assume that you have the private key material for the key. CFNlong does not create or return the private key material when you import a key pair.
* When you create a new key pair, the private key is saved to SYSlong Parameter Store, using a parameter with the following name: ``/ec2/keypair/{key_pair_id}``. For more information about retrieving private key, and the required permissions, see [Create a key pair using](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html#create-key-pair-cloudformation) in the *User Guide*.
* When CFN deletes a key pair that was created or imported by a stack, it also deletes the parameter that was used to store the private key material in Parameter Store.
*/
function getKeyPair(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws-native:ec2:getKeyPair", {
"keyName": args.keyName,
}, opts);
}
exports.getKeyPair = getKeyPair;
/**
* Specifies a key pair for use with an EC2long instance as follows:
* + To import an existing key pair, include the ``PublicKeyMaterial`` property.
* + To create a new key pair, omit the ``PublicKeyMaterial`` property.
*
* When you import an existing key pair, you specify the public key material for the key. We assume that you have the private key material for the key. CFNlong does not create or return the private key material when you import a key pair.
* When you create a new key pair, the private key is saved to SYSlong Parameter Store, using a parameter with the following name: ``/ec2/keypair/{key_pair_id}``. For more information about retrieving private key, and the required permissions, see [Create a key pair using](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-key-pairs.html#create-key-pair-cloudformation) in the *User Guide*.
* When CFN deletes a key pair that was created or imported by a stack, it also deletes the parameter that was used to store the private key material in Parameter Store.
*/
function getKeyPairOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws-native:ec2:getKeyPair", {
"keyName": args.keyName,
}, opts);
}
exports.getKeyPairOutput = getKeyPairOutput;
//# sourceMappingURL=getKeyPair.js.map