All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.pricing.PricingFunctions Maven / Gradle / Ivy

Go to download

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

The newest version!
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.aws.pricing;

import com.pulumi.aws.Utilities;
import com.pulumi.aws.pricing.inputs.GetProductArgs;
import com.pulumi.aws.pricing.inputs.GetProductPlainArgs;
import com.pulumi.aws.pricing.outputs.GetProductResult;
import com.pulumi.core.Output;
import com.pulumi.core.TypeShape;
import com.pulumi.deployment.Deployment;
import com.pulumi.deployment.InvokeOptions;
import java.util.concurrent.CompletableFuture;

public final class PricingFunctions {
    /**
     * 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
     * 
     * <!--Start PulumiCodeChooser -->
     * 
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonEC2")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("c5.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("operatingSystem")
     *                     .value("Linux")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("preInstalledSw")
     *                     .value("NA")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("licenseModel")
     *                     .value("No License required")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("tenancy")
     *                     .value("Shared")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("capacitystatus")
     *                     .value("Used")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonRedshift")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("ds1.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getProduct(GetProductArgs args) { return getProduct(args, InvokeOptions.Empty); } /** * 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 * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonEC2")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("c5.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("operatingSystem")
     *                     .value("Linux")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("preInstalledSw")
     *                     .value("NA")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("licenseModel")
     *                     .value("No License required")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("tenancy")
     *                     .value("Shared")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("capacitystatus")
     *                     .value("Used")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonRedshift")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("ds1.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getProductPlain(GetProductPlainArgs args) { return getProductPlain(args, InvokeOptions.Empty); } /** * 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 * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonEC2")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("c5.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("operatingSystem")
     *                     .value("Linux")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("preInstalledSw")
     *                     .value("NA")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("licenseModel")
     *                     .value("No License required")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("tenancy")
     *                     .value("Shared")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("capacitystatus")
     *                     .value("Used")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonRedshift")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("ds1.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static Output getProduct(GetProductArgs args, InvokeOptions options) { return Deployment.getInstance().invoke("aws:pricing/getProduct:getProduct", TypeShape.of(GetProductResult.class), args, Utilities.withVersion(options)); } /** * 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 * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonEC2")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("c5.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("operatingSystem")
     *                     .value("Linux")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("preInstalledSw")
     *                     .value("NA")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("licenseModel")
     *                     .value("No License required")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("tenancy")
     *                     .value("Shared")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("capacitystatus")
     *                     .value("Used")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * * <!--Start PulumiCodeChooser --> *
     * {@code
     * package generated_program;
     * 
     * import com.pulumi.Context;
     * import com.pulumi.Pulumi;
     * import com.pulumi.core.Output;
     * import com.pulumi.aws.pricing.PricingFunctions;
     * import com.pulumi.aws.pricing.inputs.GetProductArgs;
     * import java.util.List;
     * import java.util.ArrayList;
     * import java.util.Map;
     * import java.io.File;
     * import java.nio.file.Files;
     * import java.nio.file.Paths;
     * 
     * public class App {
     *     public static void main(String[] args) {
     *         Pulumi.run(App::stack);
     *     }
     * 
     *     public static void stack(Context ctx) {
     *         final var example = PricingFunctions.getProduct(GetProductArgs.builder()
     *             .serviceCode("AmazonRedshift")
     *             .filters(            
     *                 GetProductFilterArgs.builder()
     *                     .field("instanceType")
     *                     .value("ds1.xlarge")
     *                     .build(),
     *                 GetProductFilterArgs.builder()
     *                     .field("location")
     *                     .value("US East (N. Virginia)")
     *                     .build())
     *             .build());
     * 
     *     }
     * }
     * }
     * 
* <!--End PulumiCodeChooser --> * */ public static CompletableFuture getProductPlain(GetProductPlainArgs args, InvokeOptions options) { return Deployment.getInstance().invokeAsync("aws:pricing/getProduct:getProduct", TypeShape.of(GetProductResult.class), args, Utilities.withVersion(options)); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy