1. Packages
  2. Packet
  3. API Docs
  4. getSpotMarketPrice
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

packet.getSpotMarketPrice

Explore with Pulumi AI

packet logo
Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi

    Use this data source to get Packet Spot Market Price.

    Example Usage

    using Pulumi;
    using Packet = Pulumi.Packet;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var example = Output.Create(Packet.GetSpotMarketPrice.InvokeAsync(new Packet.GetSpotMarketPriceArgs
            {
                Facility = "ewr1",
                Plan = "c1.small.x86",
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-packet/sdk/v3/go/packet"
    	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := packet.GetSpotMarketPrice(ctx, &packet.GetSpotMarketPriceArgs{
    			Facility: "ewr1",
    			Plan:     "c1.small.x86",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_packet as packet
    
    example = packet.get_spot_market_price(facility="ewr1",
        plan="c1.small.x86")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as packet from "@pulumi/packet";
    
    const example = pulumi.output(packet.getSpotMarketPrice({
        facility: "ewr1",
        plan: "c1.small.x86",
    }, { async: true }));
    

    Coming soon!

    Using getSpotMarketPrice

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSpotMarketPrice(args: GetSpotMarketPriceArgs, opts?: InvokeOptions): Promise<GetSpotMarketPriceResult>
    function getSpotMarketPriceOutput(args: GetSpotMarketPriceOutputArgs, opts?: InvokeOptions): Output<GetSpotMarketPriceResult>
    def get_spot_market_price(facility: Optional[str] = None,
                              plan: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetSpotMarketPriceResult
    def get_spot_market_price_output(facility: Optional[pulumi.Input[str]] = None,
                              plan: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetSpotMarketPriceResult]
    func GetSpotMarketPrice(ctx *Context, args *GetSpotMarketPriceArgs, opts ...InvokeOption) (*GetSpotMarketPriceResult, error)
    func GetSpotMarketPriceOutput(ctx *Context, args *GetSpotMarketPriceOutputArgs, opts ...InvokeOption) GetSpotMarketPriceResultOutput

    > Note: This function is named GetSpotMarketPrice in the Go SDK.

    public static class GetSpotMarketPrice 
    {
        public static Task<GetSpotMarketPriceResult> InvokeAsync(GetSpotMarketPriceArgs args, InvokeOptions? opts = null)
        public static Output<GetSpotMarketPriceResult> Invoke(GetSpotMarketPriceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSpotMarketPriceResult> getSpotMarketPrice(GetSpotMarketPriceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: packet:index/getSpotMarketPrice:getSpotMarketPrice
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Facility string
    Name of the facility.
    Plan string
    Name of the plan.
    Facility string
    Name of the facility.
    Plan string
    Name of the plan.
    facility String
    Name of the facility.
    plan String
    Name of the plan.
    facility string
    Name of the facility.
    plan string
    Name of the plan.
    facility str
    Name of the facility.
    plan str
    Name of the plan.
    facility String
    Name of the facility.
    plan String
    Name of the plan.

    getSpotMarketPrice Result

    The following output properties are available:

    Facility string
    Id string
    The provider-assigned unique ID for this managed resource.
    Plan string
    Price double
    Current spot market price for given plan in given facility.
    Facility string
    Id string
    The provider-assigned unique ID for this managed resource.
    Plan string
    Price float64
    Current spot market price for given plan in given facility.
    facility String
    id String
    The provider-assigned unique ID for this managed resource.
    plan String
    price Double
    Current spot market price for given plan in given facility.
    facility string
    id string
    The provider-assigned unique ID for this managed resource.
    plan string
    price number
    Current spot market price for given plan in given facility.
    facility str
    id str
    The provider-assigned unique ID for this managed resource.
    plan str
    price float
    Current spot market price for given plan in given facility.
    facility String
    id String
    The provider-assigned unique ID for this managed resource.
    plan String
    price Number
    Current spot market price for given plan in given facility.

    Package Details

    Repository
    Packet pulumi/pulumi-packet
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the packet Terraform Provider.
    packet logo
    Packet v3.2.2 published on Thursday, Nov 12, 2020 by Pulumi