1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. marketplace
  5. Order
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

alicloud.marketplace.Order

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const order = new alicloud.marketplace.Order("order", {
        couponId: "",
        duration: 1,
        packageVersion: "yuncode2713600001",
        payType: "prepay",
        pricingCycle: "Month",
        productCode: "cmapi033136",
        quantity: 1,
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    order = alicloud.marketplace.Order("order",
        coupon_id="",
        duration=1,
        package_version="yuncode2713600001",
        pay_type="prepay",
        pricing_cycle="Month",
        product_code="cmapi033136",
        quantity=1)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/marketplace"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := marketplace.NewOrder(ctx, "order", &marketplace.OrderArgs{
    			CouponId:       pulumi.String(""),
    			Duration:       pulumi.Int(1),
    			PackageVersion: pulumi.String("yuncode2713600001"),
    			PayType:        pulumi.String("prepay"),
    			PricingCycle:   pulumi.String("Month"),
    			ProductCode:    pulumi.String("cmapi033136"),
    			Quantity:       pulumi.Int(1),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var order = new AliCloud.MarketPlace.Order("order", new()
        {
            CouponId = "",
            Duration = 1,
            PackageVersion = "yuncode2713600001",
            PayType = "prepay",
            PricingCycle = "Month",
            ProductCode = "cmapi033136",
            Quantity = 1,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.marketplace.Order;
    import com.pulumi.alicloud.marketplace.OrderArgs;
    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) {
            var order = new Order("order", OrderArgs.builder()        
                .couponId("")
                .duration(1)
                .packageVersion("yuncode2713600001")
                .payType("prepay")
                .pricingCycle("Month")
                .productCode("cmapi033136")
                .quantity(1)
                .build());
    
        }
    }
    
    resources:
      order:
        type: alicloud:marketplace:Order
        properties:
          couponId:
          duration: 1
          packageVersion: yuncode2713600001
          payType: prepay
          pricingCycle: Month
          productCode: cmapi033136
          quantity: 1
    

    Create Order Resource

    new Order(name: string, args: OrderArgs, opts?: CustomResourceOptions);
    @overload
    def Order(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              components: Optional[Mapping[str, Any]] = None,
              coupon_id: Optional[str] = None,
              duration: Optional[int] = None,
              package_version: Optional[str] = None,
              pay_type: Optional[str] = None,
              pricing_cycle: Optional[str] = None,
              product_code: Optional[str] = None,
              quantity: Optional[int] = None)
    @overload
    def Order(resource_name: str,
              args: OrderArgs,
              opts: Optional[ResourceOptions] = None)
    func NewOrder(ctx *Context, name string, args OrderArgs, opts ...ResourceOption) (*Order, error)
    public Order(string name, OrderArgs args, CustomResourceOptions? opts = null)
    public Order(String name, OrderArgs args)
    public Order(String name, OrderArgs args, CustomResourceOptions options)
    
    type: alicloud:marketplace:Order
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args OrderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args OrderArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args OrderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrderArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Order Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Order resource accepts the following input properties:

    PackageVersion string
    The package version of the market product.
    PricingCycle string
    The purchase cycle of the product, valid values are Day, Month and Year.
    ProductCode string
    The product_code of market place product.
    Components Dictionary<string, object>
    Service providers customize additional components.
    CouponId string
    The coupon id of the market product.
    Duration int
    The number of purchase cycles.
    PayType string
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    Quantity int
    The quantity of the market product will be purchased.
    PackageVersion string
    The package version of the market product.
    PricingCycle string
    The purchase cycle of the product, valid values are Day, Month and Year.
    ProductCode string
    The product_code of market place product.
    Components map[string]interface{}
    Service providers customize additional components.
    CouponId string
    The coupon id of the market product.
    Duration int
    The number of purchase cycles.
    PayType string
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    Quantity int
    The quantity of the market product will be purchased.
    packageVersion String
    The package version of the market product.
    pricingCycle String
    The purchase cycle of the product, valid values are Day, Month and Year.
    productCode String
    The product_code of market place product.
    components Map<String,Object>
    Service providers customize additional components.
    couponId String
    The coupon id of the market product.
    duration Integer
    The number of purchase cycles.
    payType String
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    quantity Integer
    The quantity of the market product will be purchased.
    packageVersion string
    The package version of the market product.
    pricingCycle string
    The purchase cycle of the product, valid values are Day, Month and Year.
    productCode string
    The product_code of market place product.
    components {[key: string]: any}
    Service providers customize additional components.
    couponId string
    The coupon id of the market product.
    duration number
    The number of purchase cycles.
    payType string
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    quantity number
    The quantity of the market product will be purchased.
    package_version str
    The package version of the market product.
    pricing_cycle str
    The purchase cycle of the product, valid values are Day, Month and Year.
    product_code str
    The product_code of market place product.
    components Mapping[str, Any]
    Service providers customize additional components.
    coupon_id str
    The coupon id of the market product.
    duration int
    The number of purchase cycles.
    pay_type str
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    quantity int
    The quantity of the market product will be purchased.
    packageVersion String
    The package version of the market product.
    pricingCycle String
    The purchase cycle of the product, valid values are Day, Month and Year.
    productCode String
    The product_code of market place product.
    components Map<Any>
    Service providers customize additional components.
    couponId String
    The coupon id of the market product.
    duration Number
    The number of purchase cycles.
    payType String
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    quantity Number
    The quantity of the market product will be purchased.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Order resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Order Resource

    Get an existing Order resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: OrderState, opts?: CustomResourceOptions): Order
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            components: Optional[Mapping[str, Any]] = None,
            coupon_id: Optional[str] = None,
            duration: Optional[int] = None,
            package_version: Optional[str] = None,
            pay_type: Optional[str] = None,
            pricing_cycle: Optional[str] = None,
            product_code: Optional[str] = None,
            quantity: Optional[int] = None) -> Order
    func GetOrder(ctx *Context, name string, id IDInput, state *OrderState, opts ...ResourceOption) (*Order, error)
    public static Order Get(string name, Input<string> id, OrderState? state, CustomResourceOptions? opts = null)
    public static Order get(String name, Output<String> id, OrderState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Components Dictionary<string, object>
    Service providers customize additional components.
    CouponId string
    The coupon id of the market product.
    Duration int
    The number of purchase cycles.
    PackageVersion string
    The package version of the market product.
    PayType string
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    PricingCycle string
    The purchase cycle of the product, valid values are Day, Month and Year.
    ProductCode string
    The product_code of market place product.
    Quantity int
    The quantity of the market product will be purchased.
    Components map[string]interface{}
    Service providers customize additional components.
    CouponId string
    The coupon id of the market product.
    Duration int
    The number of purchase cycles.
    PackageVersion string
    The package version of the market product.
    PayType string
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    PricingCycle string
    The purchase cycle of the product, valid values are Day, Month and Year.
    ProductCode string
    The product_code of market place product.
    Quantity int
    The quantity of the market product will be purchased.
    components Map<String,Object>
    Service providers customize additional components.
    couponId String
    The coupon id of the market product.
    duration Integer
    The number of purchase cycles.
    packageVersion String
    The package version of the market product.
    payType String
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    pricingCycle String
    The purchase cycle of the product, valid values are Day, Month and Year.
    productCode String
    The product_code of market place product.
    quantity Integer
    The quantity of the market product will be purchased.
    components {[key: string]: any}
    Service providers customize additional components.
    couponId string
    The coupon id of the market product.
    duration number
    The number of purchase cycles.
    packageVersion string
    The package version of the market product.
    payType string
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    pricingCycle string
    The purchase cycle of the product, valid values are Day, Month and Year.
    productCode string
    The product_code of market place product.
    quantity number
    The quantity of the market product will be purchased.
    components Mapping[str, Any]
    Service providers customize additional components.
    coupon_id str
    The coupon id of the market product.
    duration int
    The number of purchase cycles.
    package_version str
    The package version of the market product.
    pay_type str
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    pricing_cycle str
    The purchase cycle of the product, valid values are Day, Month and Year.
    product_code str
    The product_code of market place product.
    quantity int
    The quantity of the market product will be purchased.
    components Map<Any>
    Service providers customize additional components.
    couponId String
    The coupon id of the market product.
    duration Number
    The number of purchase cycles.
    packageVersion String
    The package version of the market product.
    payType String
    Valid values are PrePaid, PostPaid,System default to PostPaid.
    pricingCycle String
    The purchase cycle of the product, valid values are Day, Month and Year.
    productCode String
    The product_code of market place product.
    quantity Number
    The quantity of the market product will be purchased.

    Import

    Market order can be imported using the id, e.g.

    $ pulumi import alicloud:marketplace/order:Order order your-order-id
    

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.51.0 published on Saturday, Mar 23, 2024 by Pulumi