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

alicloud.cloudcontrol.getProducts

Explore with Pulumi AI

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

This data source provides Cloud Control Product available to the user.What is Product

NOTE: Available since v1.241.0.

Example Usage

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

const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.cloudcontrol.getProducts({
    ids: ["VPC"],
});
Copy
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "terraform-example"
default = alicloud.cloudcontrol.get_products(ids=["VPC"])
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		cfg := config.New(ctx, "")
		name := "terraform-example"
		if param := cfg.Get("name"); param != "" {
			name = param
		}
		_, err := cloudcontrol.GetProducts(ctx, &cloudcontrol.GetProductsArgs{
			Ids: []string{
				"VPC",
			},
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var config = new Config();
    var name = config.Get("name") ?? "terraform-example";
    var @default = AliCloud.CloudControl.GetProducts.Invoke(new()
    {
        Ids = new[]
        {
            "VPC",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cloudcontrol.CloudcontrolFunctions;
import com.pulumi.alicloud.cloudcontrol.inputs.GetProductsArgs;
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 config = ctx.config();
        final var name = config.get("name").orElse("terraform-example");
        final var default = CloudcontrolFunctions.getProducts(GetProductsArgs.builder()
            .ids("VPC")
            .build());

    }
}
Copy
configuration:
  name:
    type: string
    default: terraform-example
variables:
  default:
    fn::invoke:
      function: alicloud:cloudcontrol:getProducts
      arguments:
        ids:
          - VPC
Copy

Using getProducts

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 getProducts(args: GetProductsArgs, opts?: InvokeOptions): Promise<GetProductsResult>
function getProductsOutput(args: GetProductsOutputArgs, opts?: InvokeOptions): Output<GetProductsResult>
Copy
def get_products(ids: Optional[Sequence[str]] = None,
                 name_regex: Optional[str] = None,
                 output_file: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetProductsResult
def get_products_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                 name_regex: Optional[pulumi.Input[str]] = None,
                 output_file: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetProductsResult]
Copy
func GetProducts(ctx *Context, args *GetProductsArgs, opts ...InvokeOption) (*GetProductsResult, error)
func GetProductsOutput(ctx *Context, args *GetProductsOutputArgs, opts ...InvokeOption) GetProductsResultOutput
Copy

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

public static class GetProducts 
{
    public static Task<GetProductsResult> InvokeAsync(GetProductsArgs args, InvokeOptions? opts = null)
    public static Output<GetProductsResult> Invoke(GetProductsInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetProductsResult> getProducts(GetProductsArgs args, InvokeOptions options)
public static Output<GetProductsResult> getProducts(GetProductsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:cloudcontrol/getProducts:getProducts
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of Product IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
OutputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
Ids Changes to this property will trigger replacement. []string
A list of Product IDs.
NameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
OutputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. List<String>
A list of Product IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
outputFile Changes to this property will trigger replacement. String
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. string[]
A list of Product IDs.
nameRegex Changes to this property will trigger replacement. string
A regex string to filter results by Group Metric Rule name.
outputFile Changes to this property will trigger replacement. string
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. Sequence[str]
A list of Product IDs.
name_regex Changes to this property will trigger replacement. str
A regex string to filter results by Group Metric Rule name.
output_file Changes to this property will trigger replacement. str
File name where to save data source results (after running pulumi preview).
ids Changes to this property will trigger replacement. List<String>
A list of Product IDs.
nameRegex Changes to this property will trigger replacement. String
A regex string to filter results by Group Metric Rule name.
outputFile Changes to this property will trigger replacement. String
File name where to save data source results (after running pulumi preview).

getProducts 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 IDs.
Names List<string>
A list of name of Products.
Products List<Pulumi.AliCloud.CloudControl.Outputs.GetProductsProduct>
A list of Product Entries. Each element contains the following attributes:
NameRegex string
OutputFile string
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of Product IDs.
Names []string
A list of name of Products.
Products []GetProductsProduct
A list of Product Entries. Each element contains the following attributes:
NameRegex string
OutputFile string
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Product IDs.
names List<String>
A list of name of Products.
products List<GetProductsProduct>
A list of Product Entries. Each element contains the following attributes:
nameRegex String
outputFile String
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of Product IDs.
names string[]
A list of name of Products.
products GetProductsProduct[]
A list of Product Entries. Each element contains the following attributes:
nameRegex string
outputFile string
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of Product IDs.
names Sequence[str]
A list of name of Products.
products Sequence[GetProductsProduct]
A list of Product Entries. Each element contains the following attributes:
name_regex str
output_file str
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of Product IDs.
names List<String>
A list of name of Products.
products List<Property Map>
A list of Product Entries. Each element contains the following attributes:
nameRegex String
outputFile String

Supporting Types

GetProductsProduct

Id This property is required. string
The ID of the resource supplied above.
ProductCode This property is required. string
The first ID of the resource
ProductName This property is required. string
The name of the resource
Id This property is required. string
The ID of the resource supplied above.
ProductCode This property is required. string
The first ID of the resource
ProductName This property is required. string
The name of the resource
id This property is required. String
The ID of the resource supplied above.
productCode This property is required. String
The first ID of the resource
productName This property is required. String
The name of the resource
id This property is required. string
The ID of the resource supplied above.
productCode This property is required. string
The first ID of the resource
productName This property is required. string
The name of the resource
id This property is required. str
The ID of the resource supplied above.
product_code This property is required. str
The first ID of the resource
product_name This property is required. str
The name of the resource
id This property is required. String
The ID of the resource supplied above.
productCode This property is required. String
The first ID of the resource
productName This property is required. String
The name of the resource

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