@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
84 lines • 2.58 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.getInstanceOutput = exports.getInstance = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to get the ID of an Amazon EC2 Instance for use in other resources.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = aws.ec2.getInstance({
* instanceId: "i-instanceid",
* filters: [
* {
* name: "image-id",
* values: ["ami-xxxxxxxx"],
* },
* {
* name: "tag:Name",
* values: ["instance-name-tag"],
* },
* ],
* });
* ```
*/
function getInstance(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:ec2/getInstance:getInstance", {
"filters": args.filters,
"getPasswordData": args.getPasswordData,
"getUserData": args.getUserData,
"instanceId": args.instanceId,
"instanceTags": args.instanceTags,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getInstance = getInstance;
/**
* Use this data source to get the ID of an Amazon EC2 Instance for use in other resources.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const foo = aws.ec2.getInstance({
* instanceId: "i-instanceid",
* filters: [
* {
* name: "image-id",
* values: ["ami-xxxxxxxx"],
* },
* {
* name: "tag:Name",
* values: ["instance-name-tag"],
* },
* ],
* });
* ```
*/
function getInstanceOutput(args, opts) {
args = args || {};
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:ec2/getInstance:getInstance", {
"filters": args.filters,
"getPasswordData": args.getPasswordData,
"getUserData": args.getUserData,
"instanceId": args.instanceId,
"instanceTags": args.instanceTags,
"region": args.region,
"tags": args.tags,
}, opts);
}
exports.getInstanceOutput = getInstanceOutput;
//# sourceMappingURL=getInstance.js.map