UNPKG

@pulumi/aws

Version:

A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.

94 lines 2.75 kB
"use strict"; // *** 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.getDedicatedHostOutput = exports.getDedicatedHost = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * Use this data source to get information about an EC2 Dedicated Host. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testDedicatedHost = new aws.ec2.DedicatedHost("test", { * instanceType: "c5.18xlarge", * availabilityZone: "us-west-2a", * }); * const test = aws.ec2.getDedicatedHostOutput({ * hostId: testDedicatedHost.id, * }); * ``` * * ### Filter Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = aws.ec2.getDedicatedHost({ * filters: [{ * name: "instance-type", * values: ["c5.18xlarge"], * }], * }); * ``` */ function getDedicatedHost(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invoke("aws:ec2/getDedicatedHost:getDedicatedHost", { "filters": args.filters, "hostId": args.hostId, "region": args.region, "tags": args.tags, }, opts); } exports.getDedicatedHost = getDedicatedHost; /** * Use this data source to get information about an EC2 Dedicated Host. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const testDedicatedHost = new aws.ec2.DedicatedHost("test", { * instanceType: "c5.18xlarge", * availabilityZone: "us-west-2a", * }); * const test = aws.ec2.getDedicatedHostOutput({ * hostId: testDedicatedHost.id, * }); * ``` * * ### Filter Example * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = aws.ec2.getDedicatedHost({ * filters: [{ * name: "instance-type", * values: ["c5.18xlarge"], * }], * }); * ``` */ function getDedicatedHostOutput(args, opts) { args = args || {}; opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {}); return pulumi.runtime.invokeOutput("aws:ec2/getDedicatedHost:getDedicatedHost", { "filters": args.filters, "hostId": args.hostId, "region": args.region, "tags": args.tags, }, opts); } exports.getDedicatedHostOutput = getDedicatedHostOutput; //# sourceMappingURL=getDedicatedHost.js.map