alicloud.marketplace.Order
Explore with Pulumi AI
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const order = new alicloud.marketplace.Order("order", {
productCode: "cmapi033136",
payType: "prepay",
quantity: 1,
duration: 1,
pricingCycle: "Month",
packageVersion: "yuncode2713600001",
couponId: "",
});
import pulumi
import pulumi_alicloud as alicloud
order = alicloud.marketplace.Order("order",
product_code="cmapi033136",
pay_type="prepay",
quantity=1,
duration=1,
pricing_cycle="Month",
package_version="yuncode2713600001",
coupon_id="")
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{
ProductCode: pulumi.String("cmapi033136"),
PayType: pulumi.String("prepay"),
Quantity: pulumi.Int(1),
Duration: pulumi.Int(1),
PricingCycle: pulumi.String("Month"),
PackageVersion: pulumi.String("yuncode2713600001"),
CouponId: pulumi.String(""),
})
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()
{
ProductCode = "cmapi033136",
PayType = "prepay",
Quantity = 1,
Duration = 1,
PricingCycle = "Month",
PackageVersion = "yuncode2713600001",
CouponId = "",
});
});
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()
.productCode("cmapi033136")
.payType("prepay")
.quantity(1)
.duration(1)
.pricingCycle("Month")
.packageVersion("yuncode2713600001")
.couponId("")
.build());
}
}
resources:
order:
type: alicloud:marketplace:Order
properties:
productCode: cmapi033136
payType: prepay
quantity: 1
duration: 1
pricingCycle: Month
packageVersion: yuncode2713600001
couponId:
Create Order Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Order(name: string, args: OrderArgs, opts?: CustomResourceOptions);
@overload
def Order(resource_name: str,
args: OrderArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Order(resource_name: str,
opts: Optional[ResourceOptions] = None,
package_version: Optional[str] = None,
pricing_cycle: Optional[str] = None,
product_code: Optional[str] = None,
components: Optional[Mapping[str, str]] = None,
coupon_id: Optional[str] = None,
duration: Optional[int] = None,
pay_type: Optional[str] = None,
quantity: Optional[int] = None)
func NewOrder(ctx *Context, name string, args OrderArgs, opts ...ResourceOption) (*Order, error)
public Order(string name, OrderArgs args, CustomResourceOptions? opts = null)
type: alicloud:marketplace:Order
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var orderResource = new AliCloud.MarketPlace.Order("orderResource", new()
{
PackageVersion = "string",
PricingCycle = "string",
ProductCode = "string",
Components =
{
{ "string", "string" },
},
CouponId = "string",
Duration = 0,
PayType = "string",
Quantity = 0,
});
example, err := marketplace.NewOrder(ctx, "orderResource", &marketplace.OrderArgs{
PackageVersion: pulumi.String("string"),
PricingCycle: pulumi.String("string"),
ProductCode: pulumi.String("string"),
Components: pulumi.StringMap{
"string": pulumi.String("string"),
},
CouponId: pulumi.String("string"),
Duration: pulumi.Int(0),
PayType: pulumi.String("string"),
Quantity: pulumi.Int(0),
})
var orderResource = new Order("orderResource", OrderArgs.builder()
.packageVersion("string")
.pricingCycle("string")
.productCode("string")
.components(Map.of("string", "string"))
.couponId("string")
.duration(0)
.payType("string")
.quantity(0)
.build());
order_resource = alicloud.marketplace.Order("orderResource",
package_version="string",
pricing_cycle="string",
product_code="string",
components={
"string": "string",
},
coupon_id="string",
duration=0,
pay_type="string",
quantity=0)
const orderResource = new alicloud.marketplace.Order("orderResource", {
packageVersion: "string",
pricingCycle: "string",
productCode: "string",
components: {
string: "string",
},
couponId: "string",
duration: 0,
payType: "string",
quantity: 0,
});
type: alicloud:marketplace:Order
properties:
components:
string: string
couponId: string
duration: 0
packageVersion: string
payType: string
pricingCycle: string
productCode: string
quantity: 0
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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Order resource accepts the following input properties:
- Package
Version string - The package version of the market product.
- Pricing
Cycle string - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - Product
Code string - The product_code of market place product.
- Components Dictionary<string, string>
- Service providers customize additional components.
- Coupon
Id string - The coupon id of the market product.
- Duration int
- The number of purchase cycles.
- Pay
Type string - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - Quantity int
- The quantity of the market product will be purchased.
- Package
Version string - The package version of the market product.
- Pricing
Cycle string - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - Product
Code string - The product_code of market place product.
- Components map[string]string
- Service providers customize additional components.
- Coupon
Id string - The coupon id of the market product.
- Duration int
- The number of purchase cycles.
- Pay
Type string - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - Quantity int
- The quantity of the market product will be purchased.
- package
Version String - The package version of the market product.
- pricing
Cycle String - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - product
Code String - The product_code of market place product.
- components Map<String,String>
- Service providers customize additional components.
- coupon
Id String - The coupon id of the market product.
- duration Integer
- The number of purchase cycles.
- pay
Type String - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - quantity Integer
- The quantity of the market product will be purchased.
- package
Version string - The package version of the market product.
- pricing
Cycle string - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - product
Code string - The product_code of market place product.
- components {[key: string]: string}
- Service providers customize additional components.
- coupon
Id string - The coupon id of the market product.
- duration number
- The number of purchase cycles.
- pay
Type string - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - 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
andYear
. - product_
code str - The product_code of market place product.
- components Mapping[str, str]
- 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 toPostPaid
. - quantity int
- The quantity of the market product will be purchased.
- package
Version String - The package version of the market product.
- pricing
Cycle String - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - product
Code String - The product_code of market place product.
- components Map<String>
- Service providers customize additional components.
- coupon
Id String - The coupon id of the market product.
- duration Number
- The number of purchase cycles.
- pay
Type String - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - 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, str]] = 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.
- Components Dictionary<string, string>
- Service providers customize additional components.
- Coupon
Id string - The coupon id of the market product.
- Duration int
- The number of purchase cycles.
- Package
Version string - The package version of the market product.
- Pay
Type string - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - Pricing
Cycle string - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - Product
Code string - The product_code of market place product.
- Quantity int
- The quantity of the market product will be purchased.
- Components map[string]string
- Service providers customize additional components.
- Coupon
Id string - The coupon id of the market product.
- Duration int
- The number of purchase cycles.
- Package
Version string - The package version of the market product.
- Pay
Type string - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - Pricing
Cycle string - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - Product
Code string - The product_code of market place product.
- Quantity int
- The quantity of the market product will be purchased.
- components Map<String,String>
- Service providers customize additional components.
- coupon
Id String - The coupon id of the market product.
- duration Integer
- The number of purchase cycles.
- package
Version String - The package version of the market product.
- pay
Type String - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - pricing
Cycle String - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - product
Code String - The product_code of market place product.
- quantity Integer
- The quantity of the market product will be purchased.
- components {[key: string]: string}
- Service providers customize additional components.
- coupon
Id string - The coupon id of the market product.
- duration number
- The number of purchase cycles.
- package
Version string - The package version of the market product.
- pay
Type string - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - pricing
Cycle string - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - product
Code string - The product_code of market place product.
- quantity number
- The quantity of the market product will be purchased.
- components Mapping[str, str]
- 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 toPostPaid
. - pricing_
cycle str - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - product_
code str - The product_code of market place product.
- quantity int
- The quantity of the market product will be purchased.
- components Map<String>
- Service providers customize additional components.
- coupon
Id String - The coupon id of the market product.
- duration Number
- The number of purchase cycles.
- package
Version String - The package version of the market product.
- pay
Type String - Valid values are
PrePaid
,PostPaid
,System default toPostPaid
. - pricing
Cycle String - The purchase cycle of the product, valid values are
Day
,Month
andYear
. - product
Code 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
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.