Ovh

v0.1.0 published on Friday, Nov 4, 2022 by lbrlabs

getCart

Use this data source to create a temporary order cart to retrieve information order cart products.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Ovh = Pulumi.Ovh;

return await Deployment.RunAsync(() => 
{
    var mycart = Ovh.Order.GetCart.Invoke(new()
    {
        Description = "...",
        OvhSubsidiary = "fr",
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-ovh/sdk/go/ovh/Order"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err = Order.GetCart(ctx, &order.GetCartArgs{
			Description:   pulumi.StringRef("..."),
			OvhSubsidiary: "fr",
		}, 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.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 mycart = OrderFunctions.getCart(GetCartArgs.builder()
            .description("...")
            .ovhSubsidiary("fr")
            .build());

    }
}
import pulumi
import pulumi_ovh as ovh

mycart = ovh.Order.get_cart(description="...",
    ovh_subsidiary="fr")
import * as pulumi from "@pulumi/pulumi";
import * as ovh from "@pulumi/ovh";

const mycart = pulumi.output(ovh.Order.getCart({
    description: "...",
    ovhSubsidiary: "fr",
}));
variables:
  mycart:
    fn::invoke:
      Function: ovh:Order:getCart
      Arguments:
        description: '...'
        ovhSubsidiary: fr

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(description: Optional[str] = None,
             expire: Optional[str] = None,
             ovh_subsidiary: Optional[str] = None,
             opts: Optional[InvokeOptions] = None) -> GetCartResult
def get_cart_output(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)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: ovh:Order/getCart:getCart
  arguments:
    # arguments dictionary

The following arguments are supported:

OvhSubsidiary string

OVHcloud Subsidiary

Description string

Description of your cart

Expire string

Expiration time (format: 2006-01-02T15:04:05+00:00)

OvhSubsidiary string

OVHcloud Subsidiary

Description string

Description of your cart

Expire string

Expiration time (format: 2006-01-02T15:04:05+00:00)

ovhSubsidiary String

OVHcloud Subsidiary

description String

Description of your cart

expire String

Expiration time (format: 2006-01-02T15:04:05+00:00)

ovhSubsidiary string

OVHcloud Subsidiary

description string

Description of your cart

expire string

Expiration time (format: 2006-01-02T15:04:05+00:00)

ovh_subsidiary str

OVHcloud Subsidiary

description str

Description of your cart

expire str

Expiration time (format: 2006-01-02T15:04:05+00:00)

ovhSubsidiary String

OVHcloud Subsidiary

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:

CartId string

Cart identifier

Expire string
Id string

The provider-assigned unique ID for this managed resource.

Items List<int>

Items of your cart

OvhSubsidiary string
ReadOnly bool

Indicates if the cart has already been validated

Description string
CartId string

Cart identifier

Expire string
Id string

The provider-assigned unique ID for this managed resource.

Items []int

Items of your cart

OvhSubsidiary string
ReadOnly bool

Indicates if the cart has already been validated

Description string
cartId String

Cart identifier

expire String
id String

The provider-assigned unique ID for this managed resource.

items List<Integer>

Items of your cart

ovhSubsidiary String
readOnly Boolean

Indicates if the cart has already been validated

description String
cartId string

Cart identifier

expire string
id string

The provider-assigned unique ID for this managed resource.

items number[]

Items of your cart

ovhSubsidiary string
readOnly boolean

Indicates if the cart has already been validated

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

description str
cartId String

Cart identifier

expire String
id String

The provider-assigned unique ID for this managed resource.

items List<Number>

Items of your cart

ovhSubsidiary String
readOnly Boolean

Indicates if the cart has already been validated

description String

Package Details

Repository
https://github.com/lbrlabs/pulumi-ovh
License
Apache-2.0
Notes

This Pulumi package is based on the ovh Terraform Provider.