1. Packages
  2. Timescale Provider
  3. API Docs
  4. getProducts
timescale 2.2.0 published on Thursday, Jun 5, 2025 by timescale

timescale.getProducts

Explore with Pulumi AI

timescale logo
timescale 2.2.0 published on Thursday, Jun 5, 2025 by timescale

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as timescale from "@pulumi/timescale";
    
    const config = new pulumi.Config();
    const tsAccessKey = config.require("tsAccessKey");
    const tsSecretKey = config.require("tsSecretKey");
    const tsProjectId = config.require("tsProjectId");
    const products = timescale.getProducts({});
    export const productsList = products;
    
    import pulumi
    import pulumi_timescale as timescale
    
    config = pulumi.Config()
    ts_access_key = config.require("tsAccessKey")
    ts_secret_key = config.require("tsSecretKey")
    ts_project_id = config.require("tsProjectId")
    products = timescale.get_products()
    pulumi.export("productsList", products)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/timescale/v2/timescale"
    	"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, "")
    		tsAccessKey := cfg.Require("tsAccessKey")
    		tsSecretKey := cfg.Require("tsSecretKey")
    		tsProjectId := cfg.Require("tsProjectId")
    		products, err := timescale.GetProducts(ctx, map[string]interface{}{}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("productsList", products)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Timescale = Pulumi.Timescale;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var tsAccessKey = config.Require("tsAccessKey");
        var tsSecretKey = config.Require("tsSecretKey");
        var tsProjectId = config.Require("tsProjectId");
        var products = Timescale.GetProducts.Invoke();
    
        return new Dictionary<string, object?>
        {
            ["productsList"] = products,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.timescale.TimescaleFunctions;
    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 tsAccessKey = config.get("tsAccessKey");
            final var tsSecretKey = config.get("tsSecretKey");
            final var tsProjectId = config.get("tsProjectId");
            final var products = TimescaleFunctions.getProducts();
    
            ctx.export("productsList", products.applyValue(getProductsResult -> getProductsResult));
        }
    }
    
    configuration:
      tsAccessKey:
        type: string
      tsSecretKey:
        type: string
      tsProjectId:
        type: string
    variables:
      products:
        fn::invoke:
          function: timescale:getProducts
          arguments: {}
    outputs:
      productsList: ${products}
    

    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(opts?: InvokeOptions): Promise<GetProductsResult>
    function getProductsOutput(opts?: InvokeOptions): Output<GetProductsResult>
    def get_products(opts: Optional[InvokeOptions] = None) -> GetProductsResult
    def get_products_output(opts: Optional[InvokeOptions] = None) -> Output[GetProductsResult]
    func GetProducts(ctx *Context, opts ...InvokeOption) (*GetProductsResult, error)
    func GetProductsOutput(ctx *Context, opts ...InvokeOption) GetProductsResultOutput

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

    public static class GetProducts 
    {
        public static Task<GetProductsResult> InvokeAsync(InvokeOptions? opts = null)
        public static Output<GetProductsResult> Invoke(InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetProductsResult> getProducts(InvokeOptions options)
    public static Output<GetProductsResult> getProducts(InvokeOptions options)
    
    fn::invoke:
      function: timescale:index/getProducts:getProducts
      arguments:
        # arguments dictionary

    getProducts Result

    The following output properties are available:

    Id string
    The ID of this resource.
    Products List<GetProductsProduct>
    Id string
    The ID of this resource.
    Products []GetProductsProduct
    id String
    The ID of this resource.
    products List<GetProductsProduct>
    id string
    The ID of this resource.
    products GetProductsProduct[]
    id str
    The ID of this resource.
    products Sequence[GetProductsProduct]
    id String
    The ID of this resource.
    products List<Property Map>

    Supporting Types

    GetProductsProduct

    GetProductsProductPlan

    MemoryGb double
    MilliCpu double
    Price double
    ProductId string
    RegionCode string
    MemoryGb float64
    MilliCpu float64
    Price float64
    ProductId string
    RegionCode string
    memoryGb Double
    milliCpu Double
    price Double
    productId String
    regionCode String
    memoryGb number
    milliCpu number
    price number
    productId string
    regionCode string
    memoryGb Number
    milliCpu Number
    price Number
    productId String
    regionCode String

    Package Details

    Repository
    timescale timescale/terraform-provider-timescale
    License
    Notes
    This Pulumi package is based on the timescale Terraform Provider.
    timescale logo
    timescale 2.2.0 published on Thursday, Jun 5, 2025 by timescale