GetProduct

This data source provides the Market product item details of Alibaba Cloud.

NOTE: Available in 1.69.0+

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var @default = Output.Create(AliCloud.MarketPlace.GetProduct.InvokeAsync(new AliCloud.MarketPlace.GetProductArgs
        {
            ProductCode = "cmapi022206",
        }));
        this.ProductName = @default.Apply(@default => @default.Products[0].Name);
        this.FirstProductSkuCode = @default.Apply(@default => @default.Products[0].Skuses[0].SkuCode);
        this.FirstProductPackageVersion = @default.Apply(@default => @default.Products[0].Skuses[0].PackageVersions[0].PackageVersion);
    }

    [Output("productName")]
    public Output<string> ProductName { get; set; }
    [Output("firstProductSkuCode")]
    public Output<string> FirstProductSkuCode { get; set; }
    [Output("firstProductPackageVersion")]
    public Output<string> FirstProductPackageVersion { get; set; }
}

Coming soon!

import pulumi
import pulumi_alicloud as alicloud

default = alicloud.marketplace.get_product(product_code="cmapi022206")
pulumi.export("productName", default.products[0]["name"])
pulumi.export("firstProductSkuCode", default.products[0]["skuses"][0]["skuCode"])
pulumi.export("firstProductPackageVersion", default.products[0]["skuses"][0]["packageVersions"][0]["package_version"])
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultProduct = pulumi.output(alicloud.marketplace.getProduct({
    productCode: "cmapi022206",
}, { async: true }));

export const productName = defaultProduct.products[0].name;
export const firstProductSkuCode = defaultProduct.products[0].skuses[0].skuCode;
export const firstProductPackageVersion = defaultProduct.products[0].skuses[0].packageVersions[0].packageVersion;

Using GetProduct

function getProduct(args: GetProductArgs, opts?: InvokeOptions): Promise<GetProductResult>
function  get_product(available_region=None, product_code=None, opts=None)
func GetProduct(ctx *Context, args *GetProductArgs, opts ...InvokeOption) (*GetProductResult, error)
public static class GetProduct {
    public static Task<GetProductResult> InvokeAsync(GetProductArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

ProductCode string

The product code of the market product.

AvailableRegion string

A available region id used to filter market place Ecs images.

ProductCode string

The product code of the market product.

AvailableRegion string

A available region id used to filter market place Ecs images.

productCode string

The product code of the market product.

availableRegion string

A available region id used to filter market place Ecs images.

product_code str

The product code of the market product.

available_region str

A available region id used to filter market place Ecs images.

GetProduct Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

ProductCode string
Products List<Pulumi.AliCloud.MarketPlace.Outputs.GetProductProduct>

A product. It contains the following attributes:

AvailableRegion string
Id string

The provider-assigned unique ID for this managed resource.

ProductCode string
Products []GetProductProduct

A product. It contains the following attributes:

AvailableRegion string
id string

The provider-assigned unique ID for this managed resource.

productCode string
products GetProductProduct[]

A product. It contains the following attributes:

availableRegion string
id str

The provider-assigned unique ID for this managed resource.

product_code str
products List[GetProductProduct]

A product. It contains the following attributes:

available_region str

Supporting Types

GetProductProduct

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Code string

The code of the product.

Description string

The description of the product.

Name string

The name of the product.

Skuses List<Pulumi.AliCloud.MarketPlace.Inputs.GetProductProductSkusArgs>

A list of one element containing sku attributes of an object. Each element contains the following attributes:

Code string

The code of the product.

Description string

The description of the product.

Name string

The name of the product.

Skuses []GetProductProductSkus

A list of one element containing sku attributes of an object. Each element contains the following attributes:

code string

The code of the product.

description string

The description of the product.

name string

The name of the product.

skuses GetProductProductSkus[]

A list of one element containing sku attributes of an object. Each element contains the following attributes:

code str

The code of the product.

description str

The description of the product.

name str

The name of the product.

skuses List[GetProductProductSkus]

A list of one element containing sku attributes of an object. Each element contains the following attributes:

GetProductProductSkus

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Images List<Pulumi.AliCloud.MarketPlace.Inputs.GetProductProductSkusImageArgs>

The list of custom ECS images, Each element contains the following attributes:

PackageVersions List<Pulumi.AliCloud.MarketPlace.Inputs.GetProductProductSkusPackageVersionArgs>

The list of package version details of this product sku, Each element contains the following attributes:

SkuCode string

The sku code of this product sku.

SkuName string

The sku name of this product sku.

Images []GetProductProductSkusImage

The list of custom ECS images, Each element contains the following attributes:

PackageVersions []GetProductProductSkusPackageVersion

The list of package version details of this product sku, Each element contains the following attributes:

SkuCode string

The sku code of this product sku.

SkuName string

The sku name of this product sku.

images GetProductProductSkusImage[]

The list of custom ECS images, Each element contains the following attributes:

packageVersions GetProductProductSkusPackageVersion[]

The list of package version details of this product sku, Each element contains the following attributes:

skuCode string

The sku code of this product sku.

skuName string

The sku name of this product sku.

images List[GetProductProductSkusImage]

The list of custom ECS images, Each element contains the following attributes:

packageVersions List[GetProductProductSkusPackageVersion]

The list of package version details of this product sku, Each element contains the following attributes:

skuCode str

The sku code of this product sku.

skuName str

The sku name of this product sku.

GetProductProductSkusImage

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ImageId string

The Ecs image id.

ImageName string

The Ecs image display name.

RegionId string

The Ecs image region.

ImageId string

The Ecs image id.

ImageName string

The Ecs image display name.

RegionId string

The Ecs image region.

imageId string

The Ecs image id.

imageName string

The Ecs image display name.

regionId string

The Ecs image region.

image_id str

The Ecs image id.

image_name str

The Ecs image display name.

regionId str

The Ecs image region.

GetProductProductSkusPackageVersion

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

PackageName string

The package name of this product sku package.

PackageVersion string

The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.

PackageName string

The package name of this product sku package.

PackageVersion string

The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.

packageName string

The package name of this product sku package.

packageVersion string

The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.

packageName str

The package name of this product sku package.

package_version str

The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.