1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. servicecatalog
  5. getProductVersions
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.servicecatalog.getProductVersions

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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)),
        };
    });
    
    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());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:servicecatalog:getProductVersions
          Arguments:
            nameRegex: 1.0.0
            productId: prod-bp125x4k29wb7q
    outputs:
      alicloudServiceCatalogProductVersionExampleId: ${default.productVersions[0].id}
    

    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>
    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]
    func GetProductVersions(ctx *Context, args *GetProductVersionsArgs, opts ...InvokeOption) (*GetProductVersionsResult, error)
    func GetProductVersionsOutput(ctx *Context, args *GetProductVersionsOutputArgs, opts ...InvokeOption) GetProductVersionsResultOutput

    > 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)
    }
    public static CompletableFuture<GetProductVersionsResult> getProductVersions(GetProductVersionsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:servicecatalog/getProductVersions:getProductVersions
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ProductId string
    Product ID
    EnableDetails bool
    Ids List<string>
    A list of Product Version IDs.
    NameRegex 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 string
    Product ID
    EnableDetails bool
    Ids []string
    A list of Product Version IDs.
    NameRegex 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 String
    Product ID
    enableDetails Boolean
    ids List<String>
    A list of Product Version IDs.
    nameRegex 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 string
    Product ID
    enableDetails boolean
    ids string[]
    A list of Product Version IDs.
    nameRegex 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 str
    Product ID
    enable_details bool
    ids Sequence[str]
    A list of Product Version IDs.
    name_regex 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 String
    Product ID
    enableDetails Boolean
    ids List<String>
    A list of Product Version IDs.
    nameRegex 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 bool
    Whether the version is activated
    CreateTime string
    The creation time of the resource
    Description string
    Version description
    Guidance string
    Administrator guidance
    Id string
    ID of product version.
    ProductId string
    Product ID
    ProductVersionId string
    The first ID of the resource
    ProductVersionName string
    The name of the resource
    TemplateType string
    Template Type
    TemplateUrl string
    Template URL
    Active bool
    Whether the version is activated
    CreateTime string
    The creation time of the resource
    Description string
    Version description
    Guidance string
    Administrator guidance
    Id string
    ID of product version.
    ProductId string
    Product ID
    ProductVersionId string
    The first ID of the resource
    ProductVersionName string
    The name of the resource
    TemplateType string
    Template Type
    TemplateUrl string
    Template URL
    active Boolean
    Whether the version is activated
    createTime String
    The creation time of the resource
    description String
    Version description
    guidance String
    Administrator guidance
    id String
    ID of product version.
    productId String
    Product ID
    productVersionId String
    The first ID of the resource
    productVersionName String
    The name of the resource
    templateType String
    Template Type
    templateUrl String
    Template URL
    active boolean
    Whether the version is activated
    createTime string
    The creation time of the resource
    description string
    Version description
    guidance string
    Administrator guidance
    id string
    ID of product version.
    productId string
    Product ID
    productVersionId string
    The first ID of the resource
    productVersionName string
    The name of the resource
    templateType string
    Template Type
    templateUrl string
    Template URL
    active bool
    Whether the version is activated
    create_time str
    The creation time of the resource
    description str
    Version description
    guidance str
    Administrator guidance
    id str
    ID of product version.
    product_id str
    Product ID
    product_version_id str
    The first ID of the resource
    product_version_name str
    The name of the resource
    template_type str
    Template Type
    template_url str
    Template URL
    active Boolean
    Whether the version is activated
    createTime String
    The creation time of the resource
    description String
    Version description
    guidance String
    Administrator guidance
    id String
    ID of product version.
    productId String
    Product ID
    productVersionId String
    The first ID of the resource
    productVersionName String
    The name of the resource
    templateType String
    Template Type
    templateUrl String
    Template URL

    GetProductVersionsVersion

    Active bool
    Whether the version is activated
    CreateTime string
    The creation time of the resource
    Description string
    Version description
    Guidance string
    Administrator guidance
    Id string
    ID of product version.
    ProductId string
    Product ID
    ProductVersionId string
    The first ID of the resource
    ProductVersionName string
    The name of the resource
    TemplateType string
    Template Type
    TemplateUrl string
    Template URL
    Active bool
    Whether the version is activated
    CreateTime string
    The creation time of the resource
    Description string
    Version description
    Guidance string
    Administrator guidance
    Id string
    ID of product version.
    ProductId string
    Product ID
    ProductVersionId string
    The first ID of the resource
    ProductVersionName string
    The name of the resource
    TemplateType string
    Template Type
    TemplateUrl string
    Template URL
    active Boolean
    Whether the version is activated
    createTime String
    The creation time of the resource
    description String
    Version description
    guidance String
    Administrator guidance
    id String
    ID of product version.
    productId String
    Product ID
    productVersionId String
    The first ID of the resource
    productVersionName String
    The name of the resource
    templateType String
    Template Type
    templateUrl String
    Template URL
    active boolean
    Whether the version is activated
    createTime string
    The creation time of the resource
    description string
    Version description
    guidance string
    Administrator guidance
    id string
    ID of product version.
    productId string
    Product ID
    productVersionId string
    The first ID of the resource
    productVersionName string
    The name of the resource
    templateType string
    Template Type
    templateUrl string
    Template URL
    active bool
    Whether the version is activated
    create_time str
    The creation time of the resource
    description str
    Version description
    guidance str
    Administrator guidance
    id str
    ID of product version.
    product_id str
    Product ID
    product_version_id str
    The first ID of the resource
    product_version_name str
    The name of the resource
    template_type str
    Template Type
    template_url str
    Template URL
    active Boolean
    Whether the version is activated
    createTime String
    The creation time of the resource
    description String
    Version description
    guidance String
    Administrator guidance
    id String
    ID of product version.
    productId String
    Product ID
    productVersionId String
    The first ID of the resource
    productVersionName String
    The name of the resource
    templateType String
    Template Type
    templateUrl 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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi