OVHCloud v2.0.7 published on Wednesday, Mar 19, 2025 by OVHcloud
ovh.Order.getCartProductOptions
Explore with Pulumi AI
Use this data source to retrieve information of order cart product options.
Example Usage
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 options = myCart.then(myCart => ovh.Order.getCartProductOptions({
    cartId: myCart.id,
    product: "cloud",
    planCode: "project",
}));
import pulumi
import pulumi_ovh as ovh
my_account = ovh.Me.get_me()
my_cart = ovh.Order.get_cart(ovh_subsidiary=my_account.ovh_subsidiary)
options = ovh.Order.get_cart_product_options(cart_id=my_cart.id,
    product="cloud",
    plan_code="project")
package main
import (
	"github.com/ovh/pulumi-ovh/sdk/v2/go/ovh/me"
	"github.com/ovh/pulumi-ovh/sdk/v2/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, map[string]interface{}{}, nil)
		if err != nil {
			return err
		}
		myCart, err := order.GetCart(ctx, &order.GetCartArgs{
			OvhSubsidiary: myAccount.OvhSubsidiary,
		}, nil)
		if err != nil {
			return err
		}
		_, err = order.GetCartProductOptions(ctx, &order.GetCartProductOptionsArgs{
			CartId:   myCart.Id,
			Product:  "cloud",
			PlanCode: "project",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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 options = Ovh.Order.GetCartProductOptions.Invoke(new()
    {
        CartId = myCart.Apply(getCartResult => getCartResult.Id),
        Product = "cloud",
        PlanCode = "project",
    });
});
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.GetCartProductOptionsArgs;
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 options = OrderFunctions.getCartProductOptions(GetCartProductOptionsArgs.builder()
            .cartId(myCart.applyValue(getCartResult -> getCartResult.id()))
            .product("cloud")
            .planCode("project")
            .build());
    }
}
variables:
  myAccount:
    fn::invoke:
      function: ovh:Me:getMe
      arguments: {}
  myCart:
    fn::invoke:
      function: ovh:Order:getCart
      arguments:
        ovhSubsidiary: ${myAccount.ovhSubsidiary}
  options:
    fn::invoke:
      function: ovh:Order:getCartProductOptions
      arguments:
        cartId: ${myCart.id}
        product: cloud
        planCode: project
Using getCartProductOptions
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 getCartProductOptions(args: GetCartProductOptionsArgs, opts?: InvokeOptions): Promise<GetCartProductOptionsResult>
function getCartProductOptionsOutput(args: GetCartProductOptionsOutputArgs, opts?: InvokeOptions): Output<GetCartProductOptionsResult>def get_cart_product_options(cart_id: Optional[str] = None,
                             catalog_name: Optional[str] = None,
                             plan_code: Optional[str] = None,
                             product: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetCartProductOptionsResult
def get_cart_product_options_output(cart_id: Optional[pulumi.Input[str]] = None,
                             catalog_name: Optional[pulumi.Input[str]] = None,
                             plan_code: Optional[pulumi.Input[str]] = None,
                             product: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetCartProductOptionsResult]func GetCartProductOptions(ctx *Context, args *GetCartProductOptionsArgs, opts ...InvokeOption) (*GetCartProductOptionsResult, error)
func GetCartProductOptionsOutput(ctx *Context, args *GetCartProductOptionsOutputArgs, opts ...InvokeOption) GetCartProductOptionsResultOutput> Note: This function is named GetCartProductOptions in the Go SDK.
public static class GetCartProductOptions 
{
    public static Task<GetCartProductOptionsResult> InvokeAsync(GetCartProductOptionsArgs args, InvokeOptions? opts = null)
    public static Output<GetCartProductOptionsResult> Invoke(GetCartProductOptionsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCartProductOptionsResult> getCartProductOptions(GetCartProductOptionsArgs args, InvokeOptions options)
public static Output<GetCartProductOptionsResult> getCartProductOptions(GetCartProductOptionsArgs args, InvokeOptions options)
fn::invoke:
  function: ovh:Order/getCartProductOptions:getCartProductOptions
  arguments:
    # arguments dictionaryThe following arguments are supported:
- CartId string
- Cart identifier
- PlanCode string
- Product offer identifier
- Product string
- Product
- CatalogName string
- Catalog name
- CartId string
- Cart identifier
- PlanCode string
- Product offer identifier
- Product string
- Product
- CatalogName string
- Catalog name
- cartId String
- Cart identifier
- planCode String
- Product offer identifier
- product String
- Product
- catalogName String
- Catalog name
- cartId string
- Cart identifier
- planCode string
- Product offer identifier
- product string
- Product
- catalogName string
- Catalog name
- cart_id str
- Cart identifier
- plan_code str
- Product offer identifier
- product str
- Product
- catalog_name str
- Catalog name
- cartId String
- Cart identifier
- planCode String
- Product offer identifier
- product String
- Product
- catalogName String
- Catalog name
getCartProductOptions Result
The following output properties are available:
- CartId string
- Id string
- The provider-assigned unique ID for this managed resource.
- PlanCode string
- Product offer identifier
- Product string
- Results
List<GetCart Product Options Result> 
- products results
- CatalogName string
- CartId string
- Id string
- The provider-assigned unique ID for this managed resource.
- PlanCode string
- Product offer identifier
- Product string
- Results
[]GetCart Product Options Result 
- products results
- CatalogName string
- cartId String
- id String
- The provider-assigned unique ID for this managed resource.
- planCode String
- Product offer identifier
- product String
- results
List<GetCart Product Options Result> 
- products results
- catalogName String
- cartId string
- id string
- The provider-assigned unique ID for this managed resource.
- planCode string
- Product offer identifier
- product string
- results
GetCart Product Options Result[] 
- products results
- catalogName string
- cart_id str
- id str
- The provider-assigned unique ID for this managed resource.
- plan_code str
- Product offer identifier
- product str
- results
Sequence[order.Get Cart Product Options Result] 
- products results
- catalog_name str
- cartId String
- id String
- The provider-assigned unique ID for this managed resource.
- planCode String
- Product offer identifier
- product String
- results List<Property Map>
- products results
- catalogName String
Supporting Types
GetCartProductOptionsResult    
- Exclusive bool
- Define if options of this family are exclusive with each other
- Family string
- Option family
- Mandatory bool
- Define if an option of this family is mandatory
- PlanCode string
- Product offer identifier
- Prices
List<GetCart Product Options Result Price> 
- Prices of the product offer
- ProductName string
- Name of the product
- ProductType string
- Product type
- Exclusive bool
- Define if options of this family are exclusive with each other
- Family string
- Option family
- Mandatory bool
- Define if an option of this family is mandatory
- PlanCode string
- Product offer identifier
- Prices
[]GetCart Product Options Result Price 
- Prices of the product offer
- ProductName string
- Name of the product
- ProductType string
- Product type
- exclusive Boolean
- Define if options of this family are exclusive with each other
- family String
- Option family
- mandatory Boolean
- Define if an option of this family is mandatory
- planCode String
- Product offer identifier
- prices
List<GetCart Product Options Result Price> 
- Prices of the product offer
- productName String
- Name of the product
- productType String
- Product type
- exclusive boolean
- Define if options of this family are exclusive with each other
- family string
- Option family
- mandatory boolean
- Define if an option of this family is mandatory
- planCode string
- Product offer identifier
- prices
GetCart Product Options Result Price[] 
- Prices of the product offer
- productName string
- Name of the product
- productType string
- Product type
- exclusive bool
- Define if options of this family are exclusive with each other
- family str
- Option family
- mandatory bool
- Define if an option of this family is mandatory
- plan_code str
- Product offer identifier
- prices
Sequence[order.Get Cart Product Options Result Price] 
- Prices of the product offer
- product_name str
- Name of the product
- product_type str
- Product type
- exclusive Boolean
- Define if options of this family are exclusive with each other
- family String
- Option family
- mandatory Boolean
- Define if an option of this family is mandatory
- planCode String
- Product offer identifier
- prices List<Property Map>
- Prices of the product offer
- productName String
- Name of the product
- productType String
- Product type
GetCartProductOptionsResultPrice     
- 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
- PriceIn intUcents 
- Price of the product in micro-centims
- Prices
List<GetCart Product Options Result Price Price> 
- 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
- PriceIn intUcents 
- Price of the product in micro-centims
- Prices
[]GetCart Product Options Result Price Price 
- 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
- priceIn IntegerUcents 
- Price of the product in micro-centims
- prices
List<GetCart Product Options Result Price Price> 
- 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
- priceIn numberUcents 
- Price of the product in micro-centims
- prices
GetCart Product Options Result Price Price[] 
- 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_ intucents 
- Price of the product in micro-centims
- prices
Sequence[order.Get Cart Product Options Result Price Price] 
- 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
- priceIn NumberUcents 
- 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
GetCartProductOptionsResultPricePrice      
- 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 ovhTerraform Provider.