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:
- 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.
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
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
List[Get
Product Product] 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.
Ali Cloud. Market Place. Inputs. Get Product Product Skus Args> 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
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
List[Get
Product Product Skus] 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.
Ali Cloud. Market Place. Inputs. Get Product Product Skus Image Args> 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 Args> 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
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 str The sku code of this product sku.
- sku
Name 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.
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.
- 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 Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.