OVHCloud v1.0.0 published on Wednesday, Oct 30, 2024 by OVHcloud
ovh.Order.getCartProductPlan
Explore with Pulumi AI
Use this data source to retrieve information of order cart product plan.
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 plan = mycart.then(mycart => ovh.Order.getCartProductPlan({
cartId: mycart.id,
priceCapacity: "renew",
product: "cloud",
planCode: "project",
}));
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_plan(cart_id=mycart.id,
price_capacity="renew",
product="cloud",
plan_code="project")
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, 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.GetCartProductPlan(ctx, &order.GetCartProductPlanArgs{
CartId: mycart.Id,
PriceCapacity: "renew",
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 plan = Ovh.Order.GetCartProductPlan.Invoke(new()
{
CartId = mycart.Apply(getCartResult => getCartResult.Id),
PriceCapacity = "renew",
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.GetCartProductPlanArgs;
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.getCartProductPlan(GetCartProductPlanArgs.builder()
.cartId(mycart.applyValue(getCartResult -> getCartResult.id()))
.priceCapacity("renew")
.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}
plan:
fn::invoke:
Function: ovh:Order:getCartProductPlan
Arguments:
cartId: ${mycart.id}
priceCapacity: renew
product: cloud
planCode: project
Using getCartProductPlan
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 getCartProductPlan(args: GetCartProductPlanArgs, opts?: InvokeOptions): Promise<GetCartProductPlanResult>
function getCartProductPlanOutput(args: GetCartProductPlanOutputArgs, opts?: InvokeOptions): Output<GetCartProductPlanResult>
def get_cart_product_plan(cart_id: Optional[str] = None,
catalog_name: Optional[str] = None,
plan_code: Optional[str] = None,
price_capacity: Optional[str] = None,
product: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCartProductPlanResult
def get_cart_product_plan_output(cart_id: Optional[pulumi.Input[str]] = None,
catalog_name: 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[GetCartProductPlanResult]
func GetCartProductPlan(ctx *Context, args *GetCartProductPlanArgs, opts ...InvokeOption) (*GetCartProductPlanResult, error)
func GetCartProductPlanOutput(ctx *Context, args *GetCartProductPlanOutputArgs, opts ...InvokeOption) GetCartProductPlanResultOutput
> Note: This function is named GetCartProductPlan
in the Go SDK.
public static class GetCartProductPlan
{
public static Task<GetCartProductPlanResult> InvokeAsync(GetCartProductPlanArgs args, InvokeOptions? opts = null)
public static Output<GetCartProductPlanResult> Invoke(GetCartProductPlanInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCartProductPlanResult> getCartProductPlan(GetCartProductPlanArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: ovh:Order/getCartProductPlan:getCartProductPlan
arguments:
# arguments dictionary
The following arguments are supported:
- Cart
Id string - Cart identifier
- Plan
Code string - Product offer identifier
- Price
Capacity string - Capacity of the pricing (type of pricing)
- Product string
- Product
- Catalog
Name string - Catalog name
- Cart
Id string - Cart identifier
- Plan
Code string - Product offer identifier
- Price
Capacity string - Capacity of the pricing (type of pricing)
- Product string
- Product
- Catalog
Name string - Catalog name
- cart
Id String - Cart identifier
- plan
Code String - Product offer identifier
- price
Capacity String - Capacity of the pricing (type of pricing)
- product String
- Product
- catalog
Name String - Catalog name
- cart
Id string - Cart identifier
- plan
Code string - Product offer identifier
- price
Capacity string - Capacity of the pricing (type of pricing)
- product string
- Product
- catalog
Name string - Catalog name
- cart_
id str - Cart identifier
- plan_
code str - Product offer identifier
- price_
capacity str - Capacity of the pricing (type of pricing)
- product str
- Product
- catalog_
name str - Catalog name
- cart
Id String - Cart identifier
- plan
Code String - Product offer identifier
- price
Capacity String - Capacity of the pricing (type of pricing)
- product String
- Product
- catalog
Name String - Catalog name
getCartProductPlan Result
The following output properties are available:
- Cart
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Plan
Code string - Product offer identifier
- Price
Capacity string - Prices
List<Get
Cart Product Plan Price> - Prices of the product offer
- Product string
- Product
Name string - Name of the product
- Product
Type string - Product type
- Selected
Prices List<GetCart Product Plan Selected Price> - Selected Price according to capacity
- Catalog
Name string
- Cart
Id string - Id string
- The provider-assigned unique ID for this managed resource.
- Plan
Code string - Product offer identifier
- Price
Capacity string - Prices
[]Get
Cart Product Plan Price - Prices of the product offer
- Product string
- Product
Name string - Name of the product
- Product
Type string - Product type
- Selected
Prices []GetCart Product Plan Selected Price - Selected Price according to capacity
- Catalog
Name string
- cart
Id String - id String
- The provider-assigned unique ID for this managed resource.
- plan
Code String - Product offer identifier
- price
Capacity String - prices
List<Get
Cart Product Plan Price> - Prices of the product offer
- product String
- product
Name String - Name of the product
- product
Type String - Product type
- selected
Prices List<GetCart Product Plan Selected Price> - Selected Price according to capacity
- catalog
Name String
- cart
Id string - id string
- The provider-assigned unique ID for this managed resource.
- plan
Code string - Product offer identifier
- price
Capacity string - prices
Get
Cart Product Plan Price[] - Prices of the product offer
- product string
- product
Name string - Name of the product
- product
Type string - Product type
- selected
Prices GetCart Product Plan Selected Price[] - Selected Price according to capacity
- catalog
Name string
- cart_
id str - id str
- The provider-assigned unique ID for this managed resource.
- plan_
code str - Product offer identifier
- price_
capacity str - prices
Sequence[order.
Get Cart Product Plan Price] - Prices of the product offer
- product str
- product_
name str - Name of the product
- product_
type str - Product type
- selected_
prices Sequence[order.Get Cart Product Plan Selected Price] - Selected Price according to capacity
- catalog_
name str
- cart
Id String - id String
- The provider-assigned unique ID for this managed resource.
- plan
Code String - Product offer identifier
- price
Capacity String - prices List<Property Map>
- Prices of the product offer
- product String
- product
Name String - Name of the product
- product
Type String - Product type
- selected
Prices List<Property Map> - Selected Price according to capacity
- catalog
Name String
Supporting Types
GetCartProductPlanPrice
- 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
- 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
List<Get
Cart Product Plan Price Price> - Price of the product (Price with its currency and textual representation)
- Pricing
Mode string - Pricing model identifier
- Pricing
Type 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
- 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
[]Get
Cart Product Plan Price Price - Price of the product (Price with its currency and textual representation)
- Pricing
Mode string - Pricing model identifier
- Pricing
Type 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
- maximum
Quantity Integer - Maximum quantity that can be ordered
- maximum
Repeat Integer - Maximum repeat for renewal
- minimum
Quantity Integer - Minimum quantity that can be ordered
- minimum
Repeat Integer - Minimum repeat for renewal
- price
In IntegerUcents - Price of the product in micro-centims
- prices
List<Get
Cart Product Plan Price Price> - Price of the product (Price with its currency and textual representation)
- pricing
Mode String - Pricing model identifier
- pricing
Type 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
- maximum
Quantity number - Maximum quantity that can be ordered
- maximum
Repeat number - Maximum repeat for renewal
- minimum
Quantity number - Minimum quantity that can be ordered
- minimum
Repeat number - Minimum repeat for renewal
- price
In numberUcents - Price of the product in micro-centims
- prices
Get
Cart Product Plan Price Price[] - Price of the product (Price with its currency and textual representation)
- pricing
Mode string - Pricing model identifier
- pricing
Type 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 Plan 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
- maximum
Quantity Number - Maximum quantity that can be ordered
- maximum
Repeat Number - Maximum repeat for renewal
- minimum
Quantity Number - Minimum quantity that can be ordered
- minimum
Repeat Number - Minimum repeat for renewal
- price
In NumberUcents - Price of the product in micro-centims
- prices List<Property Map>
- Price of the product (Price with its currency and textual representation)
- pricing
Mode String - Pricing model identifier
- pricing
Type String - Pricing type
GetCartProductPlanPricePrice
- Currency
Code string - Currency code
- Text string
- Textual representation
- Value double
- The effective price
- Currency
Code string - Currency code
- Text string
- Textual representation
- Value float64
- The effective price
- currency
Code String - Currency code
- text String
- Textual representation
- value Double
- The effective price
- currency
Code 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
- currency
Code String - Currency code
- text String
- Textual representation
- value Number
- The effective price
GetCartProductPlanSelectedPrice
- 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
- 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
List<Get
Cart Product Plan Selected Price Price> - Price of the product (Price with its currency and textual representation)
- Pricing
Mode string - Pricing model identifier
- Pricing
Type 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
- 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
[]Get
Cart Product Plan Selected Price Price - Price of the product (Price with its currency and textual representation)
- Pricing
Mode string - Pricing model identifier
- Pricing
Type 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
- maximum
Quantity Integer - Maximum quantity that can be ordered
- maximum
Repeat Integer - Maximum repeat for renewal
- minimum
Quantity Integer - Minimum quantity that can be ordered
- minimum
Repeat Integer - Minimum repeat for renewal
- price
In IntegerUcents - Price of the product in micro-centims
- prices
List<Get
Cart Product Plan Selected Price Price> - Price of the product (Price with its currency and textual representation)
- pricing
Mode String - Pricing model identifier
- pricing
Type 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
- maximum
Quantity number - Maximum quantity that can be ordered
- maximum
Repeat number - Maximum repeat for renewal
- minimum
Quantity number - Minimum quantity that can be ordered
- minimum
Repeat number - Minimum repeat for renewal
- price
In numberUcents - Price of the product in micro-centims
- prices
Get
Cart Product Plan Selected Price Price[] - Price of the product (Price with its currency and textual representation)
- pricing
Mode string - Pricing model identifier
- pricing
Type 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 Plan Selected 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
- maximum
Quantity Number - Maximum quantity that can be ordered
- maximum
Repeat Number - Maximum repeat for renewal
- minimum
Quantity Number - Minimum quantity that can be ordered
- minimum
Repeat Number - Minimum repeat for renewal
- price
In NumberUcents - Price of the product in micro-centims
- prices List<Property Map>
- Price of the product (Price with its currency and textual representation)
- pricing
Mode String - Pricing model identifier
- pricing
Type String - Pricing type
GetCartProductPlanSelectedPricePrice
- Currency
Code string - Currency code
- Text string
- Textual representation
- Value double
- The effective price
- Currency
Code string - Currency code
- Text string
- Textual representation
- Value float64
- The effective price
- currency
Code String - Currency code
- text String
- Textual representation
- value Double
- The effective price
- currency
Code 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
- currency
Code 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.