1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getMariadbPrice
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

tencentcloud.getMariadbPrice

Explore with Pulumi AI

tencentcloud logo
tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack

    Use this data source to query detailed information of mariadb price

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as tencentcloud from "@pulumi/tencentcloud";
    
    const price = tencentcloud.getMariadbPrice({
        buyCount: 1,
        memory: 2,
        nodeCount: 2,
        paymode: "prepaid",
        period: 1,
        storage: 20,
        zone: "ap-guangzhou-3",
    });
    
    import pulumi
    import pulumi_tencentcloud as tencentcloud
    
    price = tencentcloud.get_mariadb_price(buy_count=1,
        memory=2,
        node_count=2,
        paymode="prepaid",
        period=1,
        storage=20,
        zone="ap-guangzhou-3")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/tencentcloud/tencentcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := tencentcloud.GetMariadbPrice(ctx, &tencentcloud.GetMariadbPriceArgs{
    			BuyCount:  1,
    			Memory:    2,
    			NodeCount: 2,
    			Paymode:   pulumi.StringRef("prepaid"),
    			Period:    pulumi.Float64Ref(1),
    			Storage:   20,
    			Zone:      "ap-guangzhou-3",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Tencentcloud = Pulumi.Tencentcloud;
    
    return await Deployment.RunAsync(() => 
    {
        var price = Tencentcloud.GetMariadbPrice.Invoke(new()
        {
            BuyCount = 1,
            Memory = 2,
            NodeCount = 2,
            Paymode = "prepaid",
            Period = 1,
            Storage = 20,
            Zone = "ap-guangzhou-3",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.tencentcloud.TencentcloudFunctions;
    import com.pulumi.tencentcloud.inputs.GetMariadbPriceArgs;
    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 price = TencentcloudFunctions.getMariadbPrice(GetMariadbPriceArgs.builder()
                .buyCount(1)
                .memory(2)
                .nodeCount(2)
                .paymode("prepaid")
                .period(1)
                .storage(20)
                .zone("ap-guangzhou-3")
                .build());
    
        }
    }
    
    variables:
      price:
        fn::invoke:
          function: tencentcloud:getMariadbPrice
          arguments:
            buyCount: 1
            memory: 2
            nodeCount: 2
            paymode: prepaid
            period: 1
            storage: 20
            zone: ap-guangzhou-3
    

    Using getMariadbPrice

    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 getMariadbPrice(args: GetMariadbPriceArgs, opts?: InvokeOptions): Promise<GetMariadbPriceResult>
    function getMariadbPriceOutput(args: GetMariadbPriceOutputArgs, opts?: InvokeOptions): Output<GetMariadbPriceResult>
    def get_mariadb_price(amount_unit: Optional[str] = None,
                          buy_count: Optional[float] = None,
                          id: Optional[str] = None,
                          memory: Optional[float] = None,
                          node_count: Optional[float] = None,
                          paymode: Optional[str] = None,
                          period: Optional[float] = None,
                          result_output_file: Optional[str] = None,
                          storage: Optional[float] = None,
                          zone: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetMariadbPriceResult
    def get_mariadb_price_output(amount_unit: Optional[pulumi.Input[str]] = None,
                          buy_count: Optional[pulumi.Input[float]] = None,
                          id: Optional[pulumi.Input[str]] = None,
                          memory: Optional[pulumi.Input[float]] = None,
                          node_count: Optional[pulumi.Input[float]] = None,
                          paymode: Optional[pulumi.Input[str]] = None,
                          period: Optional[pulumi.Input[float]] = None,
                          result_output_file: Optional[pulumi.Input[str]] = None,
                          storage: Optional[pulumi.Input[float]] = None,
                          zone: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetMariadbPriceResult]
    func GetMariadbPrice(ctx *Context, args *GetMariadbPriceArgs, opts ...InvokeOption) (*GetMariadbPriceResult, error)
    func GetMariadbPriceOutput(ctx *Context, args *GetMariadbPriceOutputArgs, opts ...InvokeOption) GetMariadbPriceResultOutput

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

    public static class GetMariadbPrice 
    {
        public static Task<GetMariadbPriceResult> InvokeAsync(GetMariadbPriceArgs args, InvokeOptions? opts = null)
        public static Output<GetMariadbPriceResult> Invoke(GetMariadbPriceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetMariadbPriceResult> getMariadbPrice(GetMariadbPriceArgs args, InvokeOptions options)
    public static Output<GetMariadbPriceResult> getMariadbPrice(GetMariadbPriceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: tencentcloud:index/getMariadbPrice:getMariadbPrice
      arguments:
        # arguments dictionary

    The following arguments are supported:

    BuyCount double
    The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
    Memory double
    Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    NodeCount double
    Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    Storage double
    Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
    Zone string
    AZ ID of the purchased instance.
    AmountUnit string
    Price unit. Valid values: * pent (cent), * microPent (microcent).
    Id string
    Paymode string
    Billing type. Valid values: postpaid (pay-as-you-go), prepaid (monthly subscription).
    Period double
    Purchase period in months.
    ResultOutputFile string
    Used to save results.
    BuyCount float64
    The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
    Memory float64
    Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    NodeCount float64
    Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    Storage float64
    Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
    Zone string
    AZ ID of the purchased instance.
    AmountUnit string
    Price unit. Valid values: * pent (cent), * microPent (microcent).
    Id string
    Paymode string
    Billing type. Valid values: postpaid (pay-as-you-go), prepaid (monthly subscription).
    Period float64
    Purchase period in months.
    ResultOutputFile string
    Used to save results.
    buyCount Double
    The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
    memory Double
    Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    nodeCount Double
    Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    storage Double
    Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
    zone String
    AZ ID of the purchased instance.
    amountUnit String
    Price unit. Valid values: * pent (cent), * microPent (microcent).
    id String
    paymode String
    Billing type. Valid values: postpaid (pay-as-you-go), prepaid (monthly subscription).
    period Double
    Purchase period in months.
    resultOutputFile String
    Used to save results.
    buyCount number
    The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
    memory number
    Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    nodeCount number
    Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    storage number
    Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
    zone string
    AZ ID of the purchased instance.
    amountUnit string
    Price unit. Valid values: * pent (cent), * microPent (microcent).
    id string
    paymode string
    Billing type. Valid values: postpaid (pay-as-you-go), prepaid (monthly subscription).
    period number
    Purchase period in months.
    resultOutputFile string
    Used to save results.
    buy_count float
    The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
    memory float
    Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    node_count float
    Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    storage float
    Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
    zone str
    AZ ID of the purchased instance.
    amount_unit str
    Price unit. Valid values: * pent (cent), * microPent (microcent).
    id str
    paymode str
    Billing type. Valid values: postpaid (pay-as-you-go), prepaid (monthly subscription).
    period float
    Purchase period in months.
    result_output_file str
    Used to save results.
    buyCount Number
    The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
    memory Number
    Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    nodeCount Number
    Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
    storage Number
    Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
    zone String
    AZ ID of the purchased instance.
    amountUnit String
    Price unit. Valid values: * pent (cent), * microPent (microcent).
    id String
    paymode String
    Billing type. Valid values: postpaid (pay-as-you-go), prepaid (monthly subscription).
    period Number
    Purchase period in months.
    resultOutputFile String
    Used to save results.

    getMariadbPrice Result

    The following output properties are available:

    BuyCount double
    Id string
    Memory double
    NodeCount double
    OriginalPrice double
    Original price * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    Price double
    The actual price may be different from the original price due to discounts. * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    Storage double
    Zone string
    AmountUnit string
    Paymode string
    Period double
    ResultOutputFile string
    BuyCount float64
    Id string
    Memory float64
    NodeCount float64
    OriginalPrice float64
    Original price * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    Price float64
    The actual price may be different from the original price due to discounts. * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    Storage float64
    Zone string
    AmountUnit string
    Paymode string
    Period float64
    ResultOutputFile string
    buyCount Double
    id String
    memory Double
    nodeCount Double
    originalPrice Double
    Original price * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    price Double
    The actual price may be different from the original price due to discounts. * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    storage Double
    zone String
    amountUnit String
    paymode String
    period Double
    resultOutputFile String
    buyCount number
    id string
    memory number
    nodeCount number
    originalPrice number
    Original price * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    price number
    The actual price may be different from the original price due to discounts. * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    storage number
    zone string
    amountUnit string
    paymode string
    period number
    resultOutputFile string
    buy_count float
    id str
    memory float
    node_count float
    original_price float
    Original price * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    price float
    The actual price may be different from the original price due to discounts. * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    storage float
    zone str
    amount_unit str
    paymode str
    period float
    result_output_file str
    buyCount Number
    id String
    memory Number
    nodeCount Number
    originalPrice Number
    Original price * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    price Number
    The actual price may be different from the original price due to discounts. * Unit: Cent (default). If the request parameter contains AmountUnit, see AmountUnit description. * Currency: CNY (Chinese site), USD (international site).
    storage Number
    zone String
    amountUnit String
    paymode String
    period Number
    resultOutputFile String

    Package Details

    Repository
    tencentcloud tencentcloudstack/terraform-provider-tencentcloud
    License
    Notes
    This Pulumi package is based on the tencentcloud Terraform Provider.
    tencentcloud logo
    tencentcloud 1.81.189 published on Wednesday, Apr 30, 2025 by tencentcloudstack