@pulumi/aws
Version:
A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources.
152 lines • 4.16 kB
JavaScript
"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.getProductOutput = exports.getProduct = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Use this data source to get the pricing information of all products in AWS.
* This data source is only available in a us-east-1 or ap-south-1 provider.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.pricing.getProduct({
* serviceCode: "AmazonEC2",
* filters: [
* {
* field: "instanceType",
* value: "c5.xlarge",
* },
* {
* field: "operatingSystem",
* value: "Linux",
* },
* {
* field: "location",
* value: "US East (N. Virginia)",
* },
* {
* field: "preInstalledSw",
* value: "NA",
* },
* {
* field: "licenseModel",
* value: "No License required",
* },
* {
* field: "tenancy",
* value: "Shared",
* },
* {
* field: "capacitystatus",
* value: "Used",
* },
* ],
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.pricing.getProduct({
* serviceCode: "AmazonRedshift",
* filters: [
* {
* field: "instanceType",
* value: "ds1.xlarge",
* },
* {
* field: "location",
* value: "US East (N. Virginia)",
* },
* ],
* });
* ```
*/
function getProduct(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invoke("aws:pricing/getProduct:getProduct", {
"filters": args.filters,
"serviceCode": args.serviceCode,
}, opts);
}
exports.getProduct = getProduct;
/**
* Use this data source to get the pricing information of all products in AWS.
* This data source is only available in a us-east-1 or ap-south-1 provider.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.pricing.getProduct({
* serviceCode: "AmazonEC2",
* filters: [
* {
* field: "instanceType",
* value: "c5.xlarge",
* },
* {
* field: "operatingSystem",
* value: "Linux",
* },
* {
* field: "location",
* value: "US East (N. Virginia)",
* },
* {
* field: "preInstalledSw",
* value: "NA",
* },
* {
* field: "licenseModel",
* value: "No License required",
* },
* {
* field: "tenancy",
* value: "Shared",
* },
* {
* field: "capacitystatus",
* value: "Used",
* },
* ],
* });
* ```
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const example = aws.pricing.getProduct({
* serviceCode: "AmazonRedshift",
* filters: [
* {
* field: "instanceType",
* value: "ds1.xlarge",
* },
* {
* field: "location",
* value: "US East (N. Virginia)",
* },
* ],
* });
* ```
*/
function getProductOutput(args, opts) {
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts || {});
return pulumi.runtime.invokeOutput("aws:pricing/getProduct:getProduct", {
"filters": args.filters,
"serviceCode": args.serviceCode,
}, opts);
}
exports.getProductOutput = getProductOutput;
//# sourceMappingURL=getProduct.js.map