Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
Use this data source to create a temporary order cart to retrieve information order cart products.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@ovhcloud/pulumi-ovh";
const myAccount = ovh.Me.getMe({});
const myCart = myAccount.then(myAccount => ovh.Order.getCart({
ovhSubsidiary: myAccount.ovhSubsidiary,
}));
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)
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
}
_, err = order.GetCart(ctx, &order.GetCartArgs{
OvhSubsidiary: myAccount.OvhSubsidiary,
}, 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),
});
});
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 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(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
final var myCart = OrderFunctions.getCart(GetCartArgs.builder()
.ovhSubsidiary(myAccount.ovhSubsidiary())
.build());
}
}
variables:
myAccount:
fn::invoke:
function: ovh:Me:getMe
arguments: {}
myCart:
fn::invoke:
function: ovh:Order:getCart
arguments:
ovhSubsidiary: ${myAccount.ovhSubsidiary}
Using getCart
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 getCart(args: GetCartArgs, opts?: InvokeOptions): Promise<GetCartResult>
function getCartOutput(args: GetCartOutputArgs, opts?: InvokeOptions): Output<GetCartResult>def get_cart(assign: Optional[bool] = None,
description: Optional[str] = None,
expire: Optional[str] = None,
ovh_subsidiary: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCartResult
def get_cart_output(assign: Optional[pulumi.Input[bool]] = None,
description: Optional[pulumi.Input[str]] = None,
expire: Optional[pulumi.Input[str]] = None,
ovh_subsidiary: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCartResult]func GetCart(ctx *Context, args *GetCartArgs, opts ...InvokeOption) (*GetCartResult, error)
func GetCartOutput(ctx *Context, args *GetCartOutputArgs, opts ...InvokeOption) GetCartResultOutput> Note: This function is named GetCart in the Go SDK.
public static class GetCart
{
public static Task<GetCartResult> InvokeAsync(GetCartArgs args, InvokeOptions? opts = null)
public static Output<GetCartResult> Invoke(GetCartInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetCartResult> getCart(GetCartArgs args, InvokeOptions options)
public static Output<GetCartResult> getCart(GetCartArgs args, InvokeOptions options)
fn::invoke:
function: ovh:Order/getCart:getCart
arguments:
# arguments dictionaryThe following arguments are supported:
- Ovh
Subsidiary string - OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under
models.nichandle.OvhSubsidiaryEnum - Assign bool
- Assign a shopping cart to a logged in client. Values can be
trueorfalse. - Description string
- Description of your cart
- Expire string
- Expiration time (format: 2006-01-02T15:04:05+00:00)
- Ovh
Subsidiary string - OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under
models.nichandle.OvhSubsidiaryEnum - Assign bool
- Assign a shopping cart to a logged in client. Values can be
trueorfalse. - Description string
- Description of your cart
- Expire string
- Expiration time (format: 2006-01-02T15:04:05+00:00)
- ovh
Subsidiary String - OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under
models.nichandle.OvhSubsidiaryEnum - assign Boolean
- Assign a shopping cart to a logged in client. Values can be
trueorfalse. - description String
- Description of your cart
- expire String
- Expiration time (format: 2006-01-02T15:04:05+00:00)
- ovh
Subsidiary string - OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under
models.nichandle.OvhSubsidiaryEnum - assign boolean
- Assign a shopping cart to a logged in client. Values can be
trueorfalse. - description string
- Description of your cart
- expire string
- Expiration time (format: 2006-01-02T15:04:05+00:00)
- ovh_
subsidiary str - OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under
models.nichandle.OvhSubsidiaryEnum - assign bool
- Assign a shopping cart to a logged in client. Values can be
trueorfalse. - description str
- Description of your cart
- expire str
- Expiration time (format: 2006-01-02T15:04:05+00:00)
- ovh
Subsidiary String - OVHcloud Subsidiary. Country of OVHcloud legal entity you'll be billed by. List of supported subsidiaries available on API at /1.0/me.json under
models.nichandle.OvhSubsidiaryEnum - assign Boolean
- Assign a shopping cart to a logged in client. Values can be
trueorfalse. - description String
- Description of your cart
- expire String
- Expiration time (format: 2006-01-02T15:04:05+00:00)
getCart Result
The following output properties are available:
- Cart
Id string - Cart identifier
- Expire string
- Id string
- The provider-assigned unique ID for this managed resource.
- Items List<int>
- Items of your cart
- Ovh
Subsidiary string - Read
Only bool - Indicates if the cart has already been validated
- Assign bool
- Description string
- Cart
Id string - Cart identifier
- Expire string
- Id string
- The provider-assigned unique ID for this managed resource.
- Items []int
- Items of your cart
- Ovh
Subsidiary string - Read
Only bool - Indicates if the cart has already been validated
- Assign bool
- Description string
- cart
Id String - Cart identifier
- expire String
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Integer>
- Items of your cart
- ovh
Subsidiary String - read
Only Boolean - Indicates if the cart has already been validated
- assign Boolean
- description String
- cart
Id string - Cart identifier
- expire string
- id string
- The provider-assigned unique ID for this managed resource.
- items number[]
- Items of your cart
- ovh
Subsidiary string - read
Only boolean - Indicates if the cart has already been validated
- assign boolean
- description string
- cart_
id str - Cart identifier
- expire str
- id str
- The provider-assigned unique ID for this managed resource.
- items Sequence[int]
- Items of your cart
- ovh_
subsidiary str - read_
only bool - Indicates if the cart has already been validated
- assign bool
- description str
- cart
Id String - Cart identifier
- expire String
- id String
- The provider-assigned unique ID for this managed resource.
- items List<Number>
- Items of your cart
- ovh
Subsidiary String - read
Only Boolean - Indicates if the cart has already been validated
- assign Boolean
- description String
Package Details
- Repository
- ovh ovh/pulumi-ovh
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
ovhTerraform Provider.
Viewing docs for OVHCloud v2.12.0
published on Thursday, Mar 12, 2026 by OVHcloud
published on Thursday, Mar 12, 2026 by OVHcloud
