1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. servicecatalog
  5. getProductVersions
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.servicecatalog.getProductVersions

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

This data source provides Service Catalog Product Version available to the user.What is Product Version

NOTE: Available in 1.196.0+

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const _default = alicloud.servicecatalog.getProductVersions({
    nameRegex: "1.0.0",
    productId: "prod-bp125x4k29wb7q",
});
export const alicloudServiceCatalogProductVersionExampleId = _default.then(_default => _default.productVersions?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

default = alicloud.servicecatalog.get_product_versions(name_regex="1.0.0",
    product_id="prod-bp125x4k29wb7q")
pulumi.export("alicloudServiceCatalogProductVersionExampleId", default.product_versions[0].id)
Copy
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/servicecatalog"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_default, err := servicecatalog.GetProductVersions(ctx, &servicecatalog.GetProductVersionsArgs{
			NameRegex: pulumi.StringRef("1.0.0"),
			ProductId: "prod-bp125x4k29wb7q",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("alicloudServiceCatalogProductVersionExampleId", _default.ProductVersions[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var @default = AliCloud.ServiceCatalog.GetProductVersions.Invoke(new()
    {
        NameRegex = "1.0.0",
        ProductId = "prod-bp125x4k29wb7q",
    });

    return new Dictionary<string, object?>
    {
        ["alicloudServiceCatalogProductVersionExampleId"] = @default.Apply(@default => @default.Apply(getProductVersionsResult => getProductVersionsResult.ProductVersions[0]?.Id)),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.servicecatalog.ServicecatalogFunctions;
import com.pulumi.alicloud.servicecatalog.inputs.GetProductVersionsArgs;
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 = ServicecatalogFunctions.getProductVersions(GetProductVersionsArgs.builder()
            .nameRegex("1.0.0")
            .productId("prod-bp125x4k29wb7q")
            .build());

        ctx.export("alicloudServiceCatalogProductVersionExampleId", default_.productVersions()[0].id());
    }
}
Copy
variables:
  default:
    fn::invoke:
      function: alicloud:servicecatalog:getProductVersions
      arguments:
        nameRegex: 1.0.0
        productId: prod-bp125x4k29wb7q
outputs:
  alicloudServiceCatalogProductVersionExampleId: ${default.productVersions[0].id}
Copy

Using getProductVersions

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 getProductVersions(args: GetProductVersionsArgs, opts?: InvokeOptions): Promise<GetProductVersionsResult>
function getProductVersionsOutput(args: GetProductVersionsOutputArgs, opts?: InvokeOptions): Output<GetProductVersionsResult>
Copy
def get_product_versions(enable_details: Optional[bool] = None,
                         ids: Optional[Sequence[str]] = None,
                         name_regex: Optional[str] = None,
                         output_file: Optional[str] = None,
                         product_id: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetProductVersionsResult
def get_product_versions_output(enable_details: Optional[pulumi.Input[bool]] = None,
                         ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                         name_regex: Optional[pulumi.Input[str]] = None,
                         output_file: Optional[pulumi.Input[str]] = None,
                         product_id: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetProductVersionsResult]
Copy
func GetProductVersions(ctx *Context, args *GetProductVersionsArgs, opts ...InvokeOption) (*GetProductVersionsResult, error)
func GetProductVersionsOutput(ctx *Context, args *GetProductVersionsOutputArgs, opts ...InvokeOption) GetProductVersionsResultOutput
Copy

> Note: This function is named GetProductVersions in the Go SDK.

public static class GetProductVersions 
{
    public static Task<GetProductVersionsResult> InvokeAsync(GetProductVersionsArgs args, InvokeOptions? opts = null)
    public static Output<GetProductVersionsResult> Invoke(GetProductVersionsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProductVersionsResult> getProductVersions(GetProductVersionsArgs args, InvokeOptions options)
public static Output<GetProductVersionsResult> getProductVersions(GetProductVersionsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:servicecatalog/getProductVersions:getProductVersions
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ProductId
This property is required.
Changes to this property will trigger replacement.
string
Product ID
EnableDetails bool
Ids List<string>
A list of Product Version IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
OutputFile string
File name where to save data source results (after running pulumi preview).
ProductId
This property is required.
Changes to this property will trigger replacement.
string
Product ID
EnableDetails bool
Ids []string
A list of Product Version IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
OutputFile string
File name where to save data source results (after running pulumi preview).
productId
This property is required.
Changes to this property will trigger replacement.
String
Product ID
enableDetails Boolean
ids List<String>
A list of Product Version IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
outputFile String
File name where to save data source results (after running pulumi preview).
productId
This property is required.
Changes to this property will trigger replacement.
string
Product ID
enableDetails boolean
ids string[]
A list of Product Version IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
outputFile string
File name where to save data source results (after running pulumi preview).
product_id
This property is required.
Changes to this property will trigger replacement.
str
Product ID
enable_details bool
ids Sequence[str]
A list of Product Version IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Group Metric Rule name.
output_file str
File name where to save data source results (after running pulumi preview).
productId
This property is required.
Changes to this property will trigger replacement.
String
Product ID
enableDetails Boolean
ids List<String>
A list of Product Version IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
outputFile String
File name where to save data source results (after running pulumi preview).

getProductVersions Result

The following output properties are available:

Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of Product Version IDs.
Names List<string>
A list of name of Product Versions.
ProductId string
ProductVersions List<Pulumi.AliCloud.ServiceCatalog.Outputs.GetProductVersionsProductVersion>
A list of Product Version Entries. Each element contains the following attributes:
Versions List<Pulumi.AliCloud.ServiceCatalog.Outputs.GetProductVersionsVersion>

Deprecated: Field 'versions' has been deprecated from provider version 1.197.0.

EnableDetails bool
NameRegex string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of Product Version IDs.
Names []string
A list of name of Product Versions.
ProductId string
ProductVersions []GetProductVersionsProductVersion
A list of Product Version Entries. Each element contains the following attributes:
Versions []GetProductVersionsVersion

Deprecated: Field 'versions' has been deprecated from provider version 1.197.0.

EnableDetails bool
NameRegex string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Product Version IDs.
names List<String>
A list of name of Product Versions.
productId String
productVersions List<GetProductVersionsProductVersion>
A list of Product Version Entries. Each element contains the following attributes:
versions List<GetProductVersionsVersion>

Deprecated: Field 'versions' has been deprecated from provider version 1.197.0.

enableDetails Boolean
nameRegex String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of Product Version IDs.
names string[]
A list of name of Product Versions.
productId string
productVersions GetProductVersionsProductVersion[]
A list of Product Version Entries. Each element contains the following attributes:
versions GetProductVersionsVersion[]

Deprecated: Field 'versions' has been deprecated from provider version 1.197.0.

enableDetails boolean
nameRegex string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of Product Version IDs.
names Sequence[str]
A list of name of Product Versions.
product_id str
product_versions Sequence[GetProductVersionsProductVersion]
A list of Product Version Entries. Each element contains the following attributes:
versions Sequence[GetProductVersionsVersion]

Deprecated: Field 'versions' has been deprecated from provider version 1.197.0.

enable_details bool
name_regex str
output_file str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Product Version IDs.
names List<String>
A list of name of Product Versions.
productId String
productVersions List<Property Map>
A list of Product Version Entries. Each element contains the following attributes:
versions List<Property Map>

Deprecated: Field 'versions' has been deprecated from provider version 1.197.0.

enableDetails Boolean
nameRegex String
outputFile String

Supporting Types

GetProductVersionsProductVersion

Active This property is required. bool
Whether the version is activated
CreateTime This property is required. string
The creation time of the resource
Description This property is required. string
Version description
Guidance This property is required. string
Administrator guidance
Id This property is required. string
ID of product version.
ProductId This property is required. string
Product ID
ProductVersionId This property is required. string
The first ID of the resource
ProductVersionName This property is required. string
The name of the resource
TemplateType This property is required. string
Template Type
TemplateUrl This property is required. string
Template URL
Active This property is required. bool
Whether the version is activated
CreateTime This property is required. string
The creation time of the resource
Description This property is required. string
Version description
Guidance This property is required. string
Administrator guidance
Id This property is required. string
ID of product version.
ProductId This property is required. string
Product ID
ProductVersionId This property is required. string
The first ID of the resource
ProductVersionName This property is required. string
The name of the resource
TemplateType This property is required. string
Template Type
TemplateUrl This property is required. string
Template URL
active This property is required. Boolean
Whether the version is activated
createTime This property is required. String
The creation time of the resource
description This property is required. String
Version description
guidance This property is required. String
Administrator guidance
id This property is required. String
ID of product version.
productId This property is required. String
Product ID
productVersionId This property is required. String
The first ID of the resource
productVersionName This property is required. String
The name of the resource
templateType This property is required. String
Template Type
templateUrl This property is required. String
Template URL
active This property is required. boolean
Whether the version is activated
createTime This property is required. string
The creation time of the resource
description This property is required. string
Version description
guidance This property is required. string
Administrator guidance
id This property is required. string
ID of product version.
productId This property is required. string
Product ID
productVersionId This property is required. string
The first ID of the resource
productVersionName This property is required. string
The name of the resource
templateType This property is required. string
Template Type
templateUrl This property is required. string
Template URL
active This property is required. bool
Whether the version is activated
create_time This property is required. str
The creation time of the resource
description This property is required. str
Version description
guidance This property is required. str
Administrator guidance
id This property is required. str
ID of product version.
product_id This property is required. str
Product ID
product_version_id This property is required. str
The first ID of the resource
product_version_name This property is required. str
The name of the resource
template_type This property is required. str
Template Type
template_url This property is required. str
Template URL
active This property is required. Boolean
Whether the version is activated
createTime This property is required. String
The creation time of the resource
description This property is required. String
Version description
guidance This property is required. String
Administrator guidance
id This property is required. String
ID of product version.
productId This property is required. String
Product ID
productVersionId This property is required. String
The first ID of the resource
productVersionName This property is required. String
The name of the resource
templateType This property is required. String
Template Type
templateUrl This property is required. String
Template URL

GetProductVersionsVersion

Active This property is required. bool
Whether the version is activated
CreateTime This property is required. string
The creation time of the resource
Description This property is required. string
Version description
Guidance This property is required. string
Administrator guidance
Id This property is required. string
ID of product version.
ProductId This property is required. string
Product ID
ProductVersionId This property is required. string
The first ID of the resource
ProductVersionName This property is required. string
The name of the resource
TemplateType This property is required. string
Template Type
TemplateUrl This property is required. string
Template URL
Active This property is required. bool
Whether the version is activated
CreateTime This property is required. string
The creation time of the resource
Description This property is required. string
Version description
Guidance This property is required. string
Administrator guidance
Id This property is required. string
ID of product version.
ProductId This property is required. string
Product ID
ProductVersionId This property is required. string
The first ID of the resource
ProductVersionName This property is required. string
The name of the resource
TemplateType This property is required. string
Template Type
TemplateUrl This property is required. string
Template URL
active This property is required. Boolean
Whether the version is activated
createTime This property is required. String
The creation time of the resource
description This property is required. String
Version description
guidance This property is required. String
Administrator guidance
id This property is required. String
ID of product version.
productId This property is required. String
Product ID
productVersionId This property is required. String
The first ID of the resource
productVersionName This property is required. String
The name of the resource
templateType This property is required. String
Template Type
templateUrl This property is required. String
Template URL
active This property is required. boolean
Whether the version is activated
createTime This property is required. string
The creation time of the resource
description This property is required. string
Version description
guidance This property is required. string
Administrator guidance
id This property is required. string
ID of product version.
productId This property is required. string
Product ID
productVersionId This property is required. string
The first ID of the resource
productVersionName This property is required. string
The name of the resource
templateType This property is required. string
Template Type
templateUrl This property is required. string
Template URL
active This property is required. bool
Whether the version is activated
create_time This property is required. str
The creation time of the resource
description This property is required. str
Version description
guidance This property is required. str
Administrator guidance
id This property is required. str
ID of product version.
product_id This property is required. str
Product ID
product_version_id This property is required. str
The first ID of the resource
product_version_name This property is required. str
The name of the resource
template_type This property is required. str
Template Type
template_url This property is required. str
Template URL
active This property is required. Boolean
Whether the version is activated
createTime This property is required. String
The creation time of the resource
description This property is required. String
Version description
guidance This property is required. String
Administrator guidance
id This property is required. String
ID of product version.
productId This property is required. String
Product ID
productVersionId This property is required. String
The first ID of the resource
productVersionName This property is required. String
The name of the resource
templateType This property is required. String
Template Type
templateUrl This property is required. String
Template URL

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi