UNPKG

@pulumi/aws

Version:

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

107 lines (106 loc) 3.66 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Information about most recent Spot Price for a given EC2 instance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getSpotPrice({ * instanceType: "t3.medium", * availabilityZone: "us-west-2a", * filters: [{ * name: "product-description", * values: ["Linux/UNIX"], * }], * }); * ``` */ export declare function getSpotPrice(args?: GetSpotPriceArgs, opts?: pulumi.InvokeOptions): Promise<GetSpotPriceResult>; /** * A collection of arguments for invoking getSpotPrice. */ export interface GetSpotPriceArgs { /** * Availability zone in which to query Spot price information. */ availabilityZone?: string; /** * One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSpotPriceHistory.html) for supported filters. Detailed below. */ filters?: inputs.ec2.GetSpotPriceFilter[]; /** * Type of instance for which to query Spot Price information. */ instanceType?: string; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: string; } /** * A collection of values returned by getSpotPrice. */ export interface GetSpotPriceResult { readonly availabilityZone?: string; readonly filters?: outputs.ec2.GetSpotPriceFilter[]; /** * The provider-assigned unique ID for this managed resource. */ readonly id: string; readonly instanceType?: string; readonly region: string; /** * Most recent Spot Price value for the given instance type and AZ. */ readonly spotPrice: string; /** * The timestamp at which the Spot Price value was published. */ readonly spotPriceTimestamp: string; } /** * Information about most recent Spot Price for a given EC2 instance. * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = aws.ec2.getSpotPrice({ * instanceType: "t3.medium", * availabilityZone: "us-west-2a", * filters: [{ * name: "product-description", * values: ["Linux/UNIX"], * }], * }); * ``` */ export declare function getSpotPriceOutput(args?: GetSpotPriceOutputArgs, opts?: pulumi.InvokeOutputOptions): pulumi.Output<GetSpotPriceResult>; /** * A collection of arguments for invoking getSpotPrice. */ export interface GetSpotPriceOutputArgs { /** * Availability zone in which to query Spot price information. */ availabilityZone?: pulumi.Input<string>; /** * One or more configuration blocks containing name-values filters. See the [EC2 API Reference](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSpotPriceHistory.html) for supported filters. Detailed below. */ filters?: pulumi.Input<pulumi.Input<inputs.ec2.GetSpotPriceFilterArgs>[]>; /** * Type of instance for which to query Spot Price information. */ instanceType?: pulumi.Input<string>; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input<string>; }