1. Packages
  2. OVH
  3. API Docs
  4. Order
  5. getCartProductOptionsPlan
OVHCloud v0.34.2 published on Friday, Sep 15, 2023 by OVHcloud

ovh.Order.getCartProductOptionsPlan

Explore with Pulumi AI

ovh logo
OVHCloud v0.34.2 published on Friday, Sep 15, 2023 by OVHcloud

    Use this data source to retrieve information of order cart product options plan.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ovh = Pulumi.Ovh;
    
    return await Deployment.RunAsync(() => 
    {
        var myaccount = Ovh.Me.GetMe.Invoke();
    
        var mycart = Ovh.Order.GetCart.Invoke(new()
        {
            OvhSubsidiary = myaccount.Apply(getMeResult => getMeResult.OvhSubsidiary),
        });
    
        var plan = Ovh.Order.GetCartProductOptionsPlan.Invoke(new()
        {
            CartId = mycart.Apply(getCartResult => getCartResult.Id),
            PriceCapacity = "renew",
            Product = "cloud",
            PlanCode = "project",
            OptionsPlanCode = "vrack",
        });
    
    });
    
    package main
    
    import (
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Me"
    	"github.com/ovh/pulumi-ovh/sdk/go/ovh/Order"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myaccount, err := Me.GetMe(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		mycart, err := Order.GetCart(ctx, &order.GetCartArgs{
    			OvhSubsidiary: myaccount.OvhSubsidiary,
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = Order.GetCartProductOptionsPlan(ctx, &order.GetCartProductOptionsPlanArgs{
    			CartId:          mycart.Id,
    			PriceCapacity:   "renew",
    			Product:         "cloud",
    			PlanCode:        "project",
    			OptionsPlanCode: "vrack",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ovh.Me.MeFunctions;
    import com.pulumi.ovh.Order.OrderFunctions;
    import com.pulumi.ovh.Order.inputs.GetCartArgs;
    import com.pulumi.ovh.Order.inputs.GetCartProductOptionsPlanArgs;
    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 myaccount = MeFunctions.getMe();
    
            final var mycart = OrderFunctions.getCart(GetCartArgs.builder()
                .ovhSubsidiary(myaccount.applyValue(getMeResult -> getMeResult.ovhSubsidiary()))
                .build());
    
            final var plan = OrderFunctions.getCartProductOptionsPlan(GetCartProductOptionsPlanArgs.builder()
                .cartId(mycart.applyValue(getCartResult -> getCartResult.id()))
                .priceCapacity("renew")
                .product("cloud")
                .planCode("project")
                .optionsPlanCode("vrack")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_ovh as ovh
    
    myaccount = ovh.Me.get_me()
    mycart = ovh.Order.get_cart(ovh_subsidiary=myaccount.ovh_subsidiary)
    plan = ovh.Order.get_cart_product_options_plan(cart_id=mycart.id,
        price_capacity="renew",
        product="cloud",
        plan_code="project",
        options_plan_code="vrack")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as ovh from "@pulumi/ovh";
    
    const myaccount = ovh.Me.getMe({});
    const mycart = myaccount.then(myaccount => ovh.Order.getCart({
        ovhSubsidiary: myaccount.ovhSubsidiary,
    }));
    const plan = mycart.then(mycart => ovh.Order.getCartProductOptionsPlan({
        cartId: mycart.id,
        priceCapacity: "renew",
        product: "cloud",
        planCode: "project",
        optionsPlanCode: "vrack",
    }));
    
    variables:
      myaccount:
        fn::invoke:
          Function: ovh:Me:getMe
          Arguments: {}
      mycart:
        fn::invoke:
          Function: ovh:Order:getCart
          Arguments:
            ovhSubsidiary: ${myaccount.ovhSubsidiary}
      plan:
        fn::invoke:
          Function: ovh:Order:getCartProductOptionsPlan
          Arguments:
            cartId: ${mycart.id}
            priceCapacity: renew
            product: cloud
            planCode: project
            optionsPlanCode: vrack
    

    Using getCartProductOptionsPlan

    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 getCartProductOptionsPlan(args: GetCartProductOptionsPlanArgs, opts?: InvokeOptions): Promise<GetCartProductOptionsPlanResult>
    function getCartProductOptionsPlanOutput(args: GetCartProductOptionsPlanOutputArgs, opts?: InvokeOptions): Output<GetCartProductOptionsPlanResult>
    def get_cart_product_options_plan(cart_id: Optional[str] = None,
                                      catalog_name: Optional[str] = None,
                                      options_plan_code: Optional[str] = None,
                                      plan_code: Optional[str] = None,
                                      price_capacity: Optional[str] = None,
                                      product: Optional[str] = None,
                                      opts: Optional[InvokeOptions] = None) -> GetCartProductOptionsPlanResult
    def get_cart_product_options_plan_output(cart_id: Optional[pulumi.Input[str]] = None,
                                      catalog_name: Optional[pulumi.Input[str]] = None,
                                      options_plan_code: Optional[pulumi.Input[str]] = None,
                                      plan_code: Optional[pulumi.Input[str]] = None,
                                      price_capacity: Optional[pulumi.Input[str]] = None,
                                      product: Optional[pulumi.Input[str]] = None,
                                      opts: Optional[InvokeOptions] = None) -> Output[GetCartProductOptionsPlanResult]
    func GetCartProductOptionsPlan(ctx *Context, args *GetCartProductOptionsPlanArgs, opts ...InvokeOption) (*GetCartProductOptionsPlanResult, error)
    func GetCartProductOptionsPlanOutput(ctx *Context, args *GetCartProductOptionsPlanOutputArgs, opts ...InvokeOption) GetCartProductOptionsPlanResultOutput

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

    public static class GetCartProductOptionsPlan 
    {
        public static Task<GetCartProductOptionsPlanResult> InvokeAsync(GetCartProductOptionsPlanArgs args, InvokeOptions? opts = null)
        public static Output<GetCartProductOptionsPlanResult> Invoke(GetCartProductOptionsPlanInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetCartProductOptionsPlanResult> getCartProductOptionsPlan(GetCartProductOptionsPlanArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: ovh:Order/getCartProductOptionsPlan:getCartProductOptionsPlan
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CartId string

    Cart identifier

    OptionsPlanCode string

    options plan code.

    PlanCode string

    Product offer identifier

    PriceCapacity string

    Capacity of the pricing (type of pricing)

    Product string

    Product

    CatalogName string

    Catalog name

    CartId string

    Cart identifier

    OptionsPlanCode string

    options plan code.

    PlanCode string

    Product offer identifier

    PriceCapacity string

    Capacity of the pricing (type of pricing)

    Product string

    Product

    CatalogName string

    Catalog name

    cartId String

    Cart identifier

    optionsPlanCode String

    options plan code.

    planCode String

    Product offer identifier

    priceCapacity String

    Capacity of the pricing (type of pricing)

    product String

    Product

    catalogName String

    Catalog name

    cartId string

    Cart identifier

    optionsPlanCode string

    options plan code.

    planCode string

    Product offer identifier

    priceCapacity string

    Capacity of the pricing (type of pricing)

    product string

    Product

    catalogName string

    Catalog name

    cart_id str

    Cart identifier

    options_plan_code str

    options plan code.

    plan_code str

    Product offer identifier

    price_capacity str

    Capacity of the pricing (type of pricing)

    product str

    Product

    catalog_name str

    Catalog name

    cartId String

    Cart identifier

    optionsPlanCode String

    options plan code.

    planCode String

    Product offer identifier

    priceCapacity String

    Capacity of the pricing (type of pricing)

    product String

    Product

    catalogName String

    Catalog name

    getCartProductOptionsPlan Result

    The following output properties are available:

    CartId string
    Exclusive bool

    Define if options of this family are exclusive with each other

    Family string

    Option family

    Id string

    The provider-assigned unique ID for this managed resource.

    Mandatory bool

    Define if an option of this family is mandatory

    OptionsPlanCode string
    PlanCode string

    Product offer identifier

    PriceCapacity string
    Prices List<GetCartProductOptionsPlanPrice>

    Prices of the product offer

    Product string
    ProductName string

    Name of the product

    ProductType string

    Product type

    SelectedPrices List<GetCartProductOptionsPlanSelectedPrice>

    Selected Price according to capacity

    CatalogName string
    CartId string
    Exclusive bool

    Define if options of this family are exclusive with each other

    Family string

    Option family

    Id string

    The provider-assigned unique ID for this managed resource.

    Mandatory bool

    Define if an option of this family is mandatory

    OptionsPlanCode string
    PlanCode string

    Product offer identifier

    PriceCapacity string
    Prices []GetCartProductOptionsPlanPrice

    Prices of the product offer

    Product string
    ProductName string

    Name of the product

    ProductType string

    Product type

    SelectedPrices []GetCartProductOptionsPlanSelectedPrice

    Selected Price according to capacity

    CatalogName string
    cartId String
    exclusive Boolean

    Define if options of this family are exclusive with each other

    family String

    Option family

    id String

    The provider-assigned unique ID for this managed resource.

    mandatory Boolean

    Define if an option of this family is mandatory

    optionsPlanCode String
    planCode String

    Product offer identifier

    priceCapacity String
    prices List<GetCartProductOptionsPlanPrice>

    Prices of the product offer

    product String
    productName String

    Name of the product

    productType String

    Product type

    selectedPrices List<GetCartProductOptionsPlanSelectedPrice>

    Selected Price according to capacity

    catalogName String
    cartId string
    exclusive boolean

    Define if options of this family are exclusive with each other

    family string

    Option family

    id string

    The provider-assigned unique ID for this managed resource.

    mandatory boolean

    Define if an option of this family is mandatory

    optionsPlanCode string
    planCode string

    Product offer identifier

    priceCapacity string
    prices GetCartProductOptionsPlanPrice[]

    Prices of the product offer

    product string
    productName string

    Name of the product

    productType string

    Product type

    selectedPrices GetCartProductOptionsPlanSelectedPrice[]

    Selected Price according to capacity

    catalogName string
    cart_id str
    exclusive bool

    Define if options of this family are exclusive with each other

    family str

    Option family

    id str

    The provider-assigned unique ID for this managed resource.

    mandatory bool

    Define if an option of this family is mandatory

    options_plan_code str
    plan_code str

    Product offer identifier

    price_capacity str
    prices GetCartProductOptionsPlanPrice]

    Prices of the product offer

    product str
    product_name str

    Name of the product

    product_type str

    Product type

    selected_prices GetCartProductOptionsPlanSelectedPrice]

    Selected Price according to capacity

    catalog_name str
    cartId String
    exclusive Boolean

    Define if options of this family are exclusive with each other

    family String

    Option family

    id String

    The provider-assigned unique ID for this managed resource.

    mandatory Boolean

    Define if an option of this family is mandatory

    optionsPlanCode String
    planCode String

    Product offer identifier

    priceCapacity String
    prices List<Property Map>

    Prices of the product offer

    product String
    productName String

    Name of the product

    productType String

    Product type

    selectedPrices List<Property Map>

    Selected Price according to capacity

    catalogName String

    Supporting Types

    GetCartProductOptionsPlanPrice

    Capacities List<object>

    Capacities of the pricing (type of pricing)

    Description string

    Description of the pricing

    Duration string

    Duration for ordering the product

    Interval int

    Interval of renewal

    MaximumQuantity int

    Maximum quantity that can be ordered

    MaximumRepeat int

    Maximum repeat for renewal

    MinimumQuantity int

    Minimum quantity that can be ordered

    MinimumRepeat int

    Minimum repeat for renewal

    PriceInUcents int

    Price of the product in micro-centims

    Prices List<GetCartProductOptionsPlanPricePrice>

    Price of the product (Price with its currency and textual representation)

    PricingMode string

    Pricing model identifier

    PricingType string

    Pricing type

    Capacities []interface{}

    Capacities of the pricing (type of pricing)

    Description string

    Description of the pricing

    Duration string

    Duration for ordering the product

    Interval int

    Interval of renewal

    MaximumQuantity int

    Maximum quantity that can be ordered

    MaximumRepeat int

    Maximum repeat for renewal

    MinimumQuantity int

    Minimum quantity that can be ordered

    MinimumRepeat int

    Minimum repeat for renewal

    PriceInUcents int

    Price of the product in micro-centims

    Prices []GetCartProductOptionsPlanPricePrice

    Price of the product (Price with its currency and textual representation)

    PricingMode string

    Pricing model identifier

    PricingType string

    Pricing type

    capacities List<Object>

    Capacities of the pricing (type of pricing)

    description String

    Description of the pricing

    duration String

    Duration for ordering the product

    interval Integer

    Interval of renewal

    maximumQuantity Integer

    Maximum quantity that can be ordered

    maximumRepeat Integer

    Maximum repeat for renewal

    minimumQuantity Integer

    Minimum quantity that can be ordered

    minimumRepeat Integer

    Minimum repeat for renewal

    priceInUcents Integer

    Price of the product in micro-centims

    prices List<GetCartProductOptionsPlanPricePrice>

    Price of the product (Price with its currency and textual representation)

    pricingMode String

    Pricing model identifier

    pricingType String

    Pricing type

    capacities any[]

    Capacities of the pricing (type of pricing)

    description string

    Description of the pricing

    duration string

    Duration for ordering the product

    interval number

    Interval of renewal

    maximumQuantity number

    Maximum quantity that can be ordered

    maximumRepeat number

    Maximum repeat for renewal

    minimumQuantity number

    Minimum quantity that can be ordered

    minimumRepeat number

    Minimum repeat for renewal

    priceInUcents number

    Price of the product in micro-centims

    prices GetCartProductOptionsPlanPricePrice[]

    Price of the product (Price with its currency and textual representation)

    pricingMode string

    Pricing model identifier

    pricingType string

    Pricing type

    capacities Sequence[Any]

    Capacities of the pricing (type of pricing)

    description str

    Description of the pricing

    duration str

    Duration for ordering the product

    interval int

    Interval of renewal

    maximum_quantity int

    Maximum quantity that can be ordered

    maximum_repeat int

    Maximum repeat for renewal

    minimum_quantity int

    Minimum quantity that can be ordered

    minimum_repeat int

    Minimum repeat for renewal

    price_in_ucents int

    Price of the product in micro-centims

    prices GetCartProductOptionsPlanPricePrice]

    Price of the product (Price with its currency and textual representation)

    pricing_mode str

    Pricing model identifier

    pricing_type str

    Pricing type

    capacities List<Any>

    Capacities of the pricing (type of pricing)

    description String

    Description of the pricing

    duration String

    Duration for ordering the product

    interval Number

    Interval of renewal

    maximumQuantity Number

    Maximum quantity that can be ordered

    maximumRepeat Number

    Maximum repeat for renewal

    minimumQuantity Number

    Minimum quantity that can be ordered

    minimumRepeat Number

    Minimum repeat for renewal

    priceInUcents Number

    Price of the product in micro-centims

    prices List<Property Map>

    Price of the product (Price with its currency and textual representation)

    pricingMode String

    Pricing model identifier

    pricingType String

    Pricing type

    GetCartProductOptionsPlanPricePrice

    CurrencyCode string

    Currency code

    Text string

    Textual representation

    Value double

    The effective price

    CurrencyCode string

    Currency code

    Text string

    Textual representation

    Value float64

    The effective price

    currencyCode String

    Currency code

    text String

    Textual representation

    value Double

    The effective price

    currencyCode string

    Currency code

    text string

    Textual representation

    value number

    The effective price

    currency_code str

    Currency code

    text str

    Textual representation

    value float

    The effective price

    currencyCode String

    Currency code

    text String

    Textual representation

    value Number

    The effective price

    GetCartProductOptionsPlanSelectedPrice

    Capacities List<object>

    Capacities of the pricing (type of pricing)

    Description string

    Description of the pricing

    Duration string

    Duration for ordering the product

    Interval int

    Interval of renewal

    MaximumQuantity int

    Maximum quantity that can be ordered

    MaximumRepeat int

    Maximum repeat for renewal

    MinimumQuantity int

    Minimum quantity that can be ordered

    MinimumRepeat int

    Minimum repeat for renewal

    PriceInUcents int

    Price of the product in micro-centims

    Prices List<GetCartProductOptionsPlanSelectedPricePrice>

    Price of the product (Price with its currency and textual representation)

    PricingMode string

    Pricing model identifier

    PricingType string

    Pricing type

    Capacities []interface{}

    Capacities of the pricing (type of pricing)

    Description string

    Description of the pricing

    Duration string

    Duration for ordering the product

    Interval int

    Interval of renewal

    MaximumQuantity int

    Maximum quantity that can be ordered

    MaximumRepeat int

    Maximum repeat for renewal

    MinimumQuantity int

    Minimum quantity that can be ordered

    MinimumRepeat int

    Minimum repeat for renewal

    PriceInUcents int

    Price of the product in micro-centims

    Prices []GetCartProductOptionsPlanSelectedPricePrice

    Price of the product (Price with its currency and textual representation)

    PricingMode string

    Pricing model identifier

    PricingType string

    Pricing type

    capacities List<Object>

    Capacities of the pricing (type of pricing)

    description String

    Description of the pricing

    duration String

    Duration for ordering the product

    interval Integer

    Interval of renewal

    maximumQuantity Integer

    Maximum quantity that can be ordered

    maximumRepeat Integer

    Maximum repeat for renewal

    minimumQuantity Integer

    Minimum quantity that can be ordered

    minimumRepeat Integer

    Minimum repeat for renewal

    priceInUcents Integer

    Price of the product in micro-centims

    prices List<GetCartProductOptionsPlanSelectedPricePrice>

    Price of the product (Price with its currency and textual representation)

    pricingMode String

    Pricing model identifier

    pricingType String

    Pricing type

    capacities any[]

    Capacities of the pricing (type of pricing)

    description string

    Description of the pricing

    duration string

    Duration for ordering the product

    interval number

    Interval of renewal

    maximumQuantity number

    Maximum quantity that can be ordered

    maximumRepeat number

    Maximum repeat for renewal

    minimumQuantity number

    Minimum quantity that can be ordered

    minimumRepeat number

    Minimum repeat for renewal

    priceInUcents number

    Price of the product in micro-centims

    prices GetCartProductOptionsPlanSelectedPricePrice[]

    Price of the product (Price with its currency and textual representation)

    pricingMode string

    Pricing model identifier

    pricingType string

    Pricing type

    capacities Sequence[Any]

    Capacities of the pricing (type of pricing)

    description str

    Description of the pricing

    duration str

    Duration for ordering the product

    interval int

    Interval of renewal

    maximum_quantity int

    Maximum quantity that can be ordered

    maximum_repeat int

    Maximum repeat for renewal

    minimum_quantity int

    Minimum quantity that can be ordered

    minimum_repeat int

    Minimum repeat for renewal

    price_in_ucents int

    Price of the product in micro-centims

    prices GetCartProductOptionsPlanSelectedPricePrice]

    Price of the product (Price with its currency and textual representation)

    pricing_mode str

    Pricing model identifier

    pricing_type str

    Pricing type

    capacities List<Any>

    Capacities of the pricing (type of pricing)

    description String

    Description of the pricing

    duration String

    Duration for ordering the product

    interval Number

    Interval of renewal

    maximumQuantity Number

    Maximum quantity that can be ordered

    maximumRepeat Number

    Maximum repeat for renewal

    minimumQuantity Number

    Minimum quantity that can be ordered

    minimumRepeat Number

    Minimum repeat for renewal

    priceInUcents Number

    Price of the product in micro-centims

    prices List<Property Map>

    Price of the product (Price with its currency and textual representation)

    pricingMode String

    Pricing model identifier

    pricingType String

    Pricing type

    GetCartProductOptionsPlanSelectedPricePrice

    CurrencyCode string

    Currency code

    Text string

    Textual representation

    Value double

    The effective price

    CurrencyCode string

    Currency code

    Text string

    Textual representation

    Value float64

    The effective price

    currencyCode String

    Currency code

    text String

    Textual representation

    value Double

    The effective price

    currencyCode string

    Currency code

    text string

    Textual representation

    value number

    The effective price

    currency_code str

    Currency code

    text str

    Textual representation

    value float

    The effective price

    currencyCode String

    Currency code

    text String

    Textual representation

    value Number

    The effective price

    Package Details

    Repository
    ovh ovh/pulumi-ovh
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the ovh Terraform Provider.

    ovh logo
    OVHCloud v0.34.2 published on Friday, Sep 15, 2023 by OVHcloud