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

tencentcloud.getMariadbPrice

Explore with Pulumi AI

tencentcloud 1.81.183 published on Wednesday, Apr 16, 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",
});
Copy
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")
Copy
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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
variables:
  price:
    fn::invoke:
      function: tencentcloud:getMariadbPrice
      arguments:
        buyCount: 1
        memory: 2
        nodeCount: 2
        paymode: prepaid
        period: 1
        storage: 20
        zone: ap-guangzhou-3
Copy

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>
Copy
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]
Copy
func GetMariadbPrice(ctx *Context, args *GetMariadbPriceArgs, opts ...InvokeOption) (*GetMariadbPriceResult, error)
func GetMariadbPriceOutput(ctx *Context, args *GetMariadbPriceOutputArgs, opts ...InvokeOption) GetMariadbPriceResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetMariadbPriceResult> getMariadbPrice(GetMariadbPriceArgs args, InvokeOptions options)
public static Output<GetMariadbPriceResult> getMariadbPrice(GetMariadbPriceArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getMariadbPrice:getMariadbPrice
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

BuyCount This property is required. double
The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
Memory This property is required. double
Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
NodeCount This property is required. double
Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
Storage This property is required. double
Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
Zone This property is required. 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 This property is required. float64
The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
Memory This property is required. float64
Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
NodeCount This property is required. float64
Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
Storage This property is required. float64
Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
Zone This property is required. 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 This property is required. Double
The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
memory This property is required. Double
Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
nodeCount This property is required. Double
Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
storage This property is required. Double
Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
zone This property is required. 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 This property is required. number
The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
memory This property is required. number
Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
nodeCount This property is required. number
Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
storage This property is required. number
Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
zone This property is required. 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 This property is required. float
The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
memory This property is required. float
Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
node_count This property is required. float
Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
storage This property is required. float
Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
zone This property is required. 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 This property is required. Number
The quantity you want to purchase is queried by default for the price of purchasing 1 instance.
memory This property is required. Number
Memory size in GB, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
nodeCount This property is required. Number
Number of instance nodes, which can be obtained by querying the instance specification through the DescribeDBInstanceSpecs API.
storage This property is required. Number
Storage capacity in GB. The maximum and minimum storage space can be obtained by querying instance specification through the DescribeDBInstanceSpecs API.
zone This property is required. 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 1.81.183 published on Wednesday, Apr 16, 2025 by tencentcloudstack