Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
This data source provides the Market product item details of Alibaba Cloud.
NOTE: Available in 1.69.0+
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const _default = alicloud.marketplace.getProduct({
productCode: "cmapi022206",
});
export const productName = _default.then(_default => _default.products?.[0]?.name);
export const firstProductSkuCode = _default.then(_default => _default.products?.[0]?.skuses?.[0]?.skuCode);
export const firstProductPackageVersion = _default.then(_default => _default.products?.[0]?.skuses?.[0]?.packageVersions?.[0]?.packageVersion);
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].sku_code)
pulumi.export("firstProductPackageVersion", default.products[0].skuses[0].package_versions[0].package_version)
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 {
_default, err := marketplace.GetProduct(ctx, &marketplace.GetProductArgs{
ProductCode: "cmapi022206",
}, nil)
if err != nil {
return err
}
ctx.Export("productName", _default.Products[0].Name)
ctx.Export("firstProductSkuCode", _default.Products[0].Skuses[0].SkuCode)
ctx.Export("firstProductPackageVersion", _default.Products[0].Skuses[0].PackageVersions[0].PackageVersion)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.MarketPlace.GetProduct.Invoke(new()
{
ProductCode = "cmapi022206",
});
return new Dictionary<string, object?>
{
["productName"] = @default.Apply(@default => @default.Apply(getProductResult => getProductResult.Products[0]?.Name)),
["firstProductSkuCode"] = @default.Apply(@default => @default.Apply(getProductResult => getProductResult.Products[0]?.Skuses[0]?.SkuCode)),
["firstProductPackageVersion"] = @default.Apply(@default => @default.Apply(getProductResult => getProductResult.Products[0]?.Skuses[0]?.PackageVersions[0]?.PackageVersion)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.marketplace.MarketplaceFunctions;
import com.pulumi.alicloud.marketplace.inputs.GetProductArgs;
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 default = MarketplaceFunctions.getProduct(GetProductArgs.builder()
.productCode("cmapi022206")
.build());
ctx.export("productName", default_.products()[0].name());
ctx.export("firstProductSkuCode", default_.products()[0].skuses()[0].skuCode());
ctx.export("firstProductPackageVersion", default_.products()[0].skuses()[0].packageVersions()[0].packageVersion());
}
}
variables:
default:
fn::invoke:
function: alicloud:marketplace:getProduct
arguments:
productCode: cmapi022206
outputs:
productName: ${default.products[0].name}
firstProductSkuCode: ${default.products[0].skuses[0].skuCode}
firstProductPackageVersion: ${default.products[0].skuses[0].packageVersions[0].packageVersion}
Using getProduct
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 getProduct(args: GetProductArgs, opts?: InvokeOptions): Promise<GetProductResult>
function getProductOutput(args: GetProductOutputArgs, opts?: InvokeOptions): Output<GetProductResult>def get_product(available_region: Optional[str] = None,
product_code: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProductResult
def get_product_output(available_region: Optional[pulumi.Input[str]] = None,
product_code: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProductResult]func GetProduct(ctx *Context, args *GetProductArgs, opts ...InvokeOption) (*GetProductResult, error)
func GetProductOutput(ctx *Context, args *GetProductOutputArgs, opts ...InvokeOption) GetProductResultOutput> Note: This function is named GetProduct in the Go SDK.
public static class GetProduct
{
public static Task<GetProductResult> InvokeAsync(GetProductArgs args, InvokeOptions? opts = null)
public static Output<GetProductResult> Invoke(GetProductInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProductResult> getProduct(GetProductArgs args, InvokeOptions options)
public static Output<GetProductResult> getProduct(GetProductArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:marketplace/getProduct:getProduct
arguments:
# arguments dictionaryThe following arguments are supported:
- Product
Code string - The product code of the market product.
- Available
Region string - A available region id used to filter market place Ecs images.
- Product
Code string - The product code of the market product.
- Available
Region string - A available region id used to filter market place Ecs images.
- product
Code String - The product code of the market product.
- available
Region String - A available region id used to filter market place Ecs images.
- product
Code string - The product code of the market product.
- available
Region 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.
- product
Code String - The product code of the market product.
- available
Region String - 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.
- Product
Code string - Products
List<Pulumi.
Ali Cloud. Market Place. Outputs. Get Product Product> - A product. It contains the following attributes:
- Available
Region string
- Id string
- The provider-assigned unique ID for this managed resource.
- Product
Code string - Products
[]Get
Product Product - A product. It contains the following attributes:
- Available
Region string
- id String
- The provider-assigned unique ID for this managed resource.
- product
Code String - products
List<Get
Product Product> - A product. It contains the following attributes:
- available
Region String
- id string
- The provider-assigned unique ID for this managed resource.
- product
Code string - products
Get
Product Product[] - A product. It contains the following attributes:
- available
Region string
- id str
- The provider-assigned unique ID for this managed resource.
- product_
code str - products
Sequence[Get
Product Product] - A product. It contains the following attributes:
- available_
region str
- id String
- The provider-assigned unique ID for this managed resource.
- product
Code String - products List<Property Map>
- A product. It contains the following attributes:
- available
Region String
Supporting Types
GetProductProduct
- Code string
- The code of the product.
- Description string
- The description of the product.
- Name string
- The name of the product.
- Skuses
List<Pulumi.
Ali Cloud. Market Place. Inputs. Get Product Product Skus> - 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
[]Get
Product Product Skus - 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
List<Get
Product Product Skus> - 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
Get
Product Product Skus[] - 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
Sequence[Get
Product Product Skus] - 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 List<Property Map>
- A list of one element containing sku attributes of an object. Each element contains the following attributes:
GetProductProductSkus
- Images
List<Pulumi.
Ali Cloud. Market Place. Inputs. Get Product Product Skus Image> - The list of custom ECS images, Each element contains the following attributes:
- Package
Versions List<Pulumi.Ali Cloud. Market Place. Inputs. Get Product Product Skus Package Version> - The list of package version details of this product sku, Each element contains the following attributes:
- Sku
Code string - The sku code of this product sku.
- Sku
Name string - The sku name of this product sku.
- Images
[]Get
Product Product Skus Image - The list of custom ECS images, Each element contains the following attributes:
- Package
Versions []GetProduct Product Skus Package Version - The list of package version details of this product sku, Each element contains the following attributes:
- Sku
Code string - The sku code of this product sku.
- Sku
Name string - The sku name of this product sku.
- images
List<Get
Product Product Skus Image> - The list of custom ECS images, Each element contains the following attributes:
- package
Versions List<GetProduct Product Skus Package Version> - The list of package version details of this product sku, Each element contains the following attributes:
- sku
Code String - The sku code of this product sku.
- sku
Name String - The sku name of this product sku.
- images
Get
Product Product Skus Image[] - The list of custom ECS images, Each element contains the following attributes:
- package
Versions GetProduct Product Skus Package Version[] - The list of package version details of this product sku, Each element contains the following attributes:
- sku
Code string - The sku code of this product sku.
- sku
Name string - The sku name of this product sku.
- images
Sequence[Get
Product Product Skus Image] - The list of custom ECS images, Each element contains the following attributes:
- package_
versions Sequence[GetProduct Product Skus Package Version] - The list of package version details of this product sku, Each element contains the following attributes:
- sku_
code str - The sku code of this product sku.
- sku_
name str - The sku name of this product sku.
- images List<Property Map>
- The list of custom ECS images, Each element contains the following attributes:
- package
Versions List<Property Map> - The list of package version details of this product sku, Each element contains the following attributes:
- sku
Code String - The sku code of this product sku.
- sku
Name String - The sku name of this product sku.
GetProductProductSkusImage
- image_
id str - The Ecs image id.
- image_
name str - The Ecs image display name.
- region_
id str - The Ecs image region.
GetProductProductSkusPackageVersion
- Package
Name string - The package name of this product sku package.
- Package
Version string - The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.
- Package
Name string - The package name of this product sku package.
- Package
Version string - The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.
- package
Name String - The package name of this product sku package.
- package
Version String - The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.
- package
Name string - The package name of this product sku package.
- package
Version string - The package version of this product sku package. Currently, the API products can return package_version, but others can not for ensure.
- package_
name 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
Name String - The package name of this product sku package.
- package
Version String - 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
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
Alibaba Cloud v3.88.1 published on Saturday, Nov 8, 2025 by Pulumi
