tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getApiGatewayUsagePlans
Start a Neo task
Explain and create a tencentcloud.getApiGatewayUsagePlans resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query API gateway usage plans.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const plan = new tencentcloud.ApiGatewayUsagePlan("plan", {
usagePlanName: "my_plan",
usagePlanDesc: "nice plan",
maxRequestNum: 100,
maxRequestNumPreSec: 10,
});
const name = tencentcloud.getApiGatewayUsagePlansOutput({
usagePlanName: plan.usagePlanName,
});
const id = tencentcloud.getApiGatewayUsagePlansOutput({
usagePlanId: plan.apiGatewayUsagePlanId,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
plan = tencentcloud.ApiGatewayUsagePlan("plan",
usage_plan_name="my_plan",
usage_plan_desc="nice plan",
max_request_num=100,
max_request_num_pre_sec=10)
name = tencentcloud.get_api_gateway_usage_plans_output(usage_plan_name=plan.usage_plan_name)
id = tencentcloud.get_api_gateway_usage_plans_output(usage_plan_id=plan.api_gateway_usage_plan_id)
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 {
plan, err := tencentcloud.NewApiGatewayUsagePlan(ctx, "plan", &tencentcloud.ApiGatewayUsagePlanArgs{
UsagePlanName: pulumi.String("my_plan"),
UsagePlanDesc: pulumi.String("nice plan"),
MaxRequestNum: pulumi.Float64(100),
MaxRequestNumPreSec: pulumi.Float64(10),
})
if err != nil {
return err
}
_ = tencentcloud.GetApiGatewayUsagePlansOutput(ctx, tencentcloud.GetApiGatewayUsagePlansOutputArgs{
UsagePlanName: plan.UsagePlanName,
}, nil)
_ = tencentcloud.GetApiGatewayUsagePlansOutput(ctx, tencentcloud.GetApiGatewayUsagePlansOutputArgs{
UsagePlanId: plan.ApiGatewayUsagePlanId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var plan = new Tencentcloud.ApiGatewayUsagePlan("plan", new()
{
UsagePlanName = "my_plan",
UsagePlanDesc = "nice plan",
MaxRequestNum = 100,
MaxRequestNumPreSec = 10,
});
var name = Tencentcloud.GetApiGatewayUsagePlans.Invoke(new()
{
UsagePlanName = plan.UsagePlanName,
});
var id = Tencentcloud.GetApiGatewayUsagePlans.Invoke(new()
{
UsagePlanId = plan.ApiGatewayUsagePlanId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ApiGatewayUsagePlan;
import com.pulumi.tencentcloud.ApiGatewayUsagePlanArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetApiGatewayUsagePlansArgs;
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) {
var plan = new ApiGatewayUsagePlan("plan", ApiGatewayUsagePlanArgs.builder()
.usagePlanName("my_plan")
.usagePlanDesc("nice plan")
.maxRequestNum(100.0)
.maxRequestNumPreSec(10.0)
.build());
final var name = TencentcloudFunctions.getApiGatewayUsagePlans(GetApiGatewayUsagePlansArgs.builder()
.usagePlanName(plan.usagePlanName())
.build());
final var id = TencentcloudFunctions.getApiGatewayUsagePlans(GetApiGatewayUsagePlansArgs.builder()
.usagePlanId(plan.apiGatewayUsagePlanId())
.build());
}
}
resources:
plan:
type: tencentcloud:ApiGatewayUsagePlan
properties:
usagePlanName: my_plan
usagePlanDesc: nice plan
maxRequestNum: 100
maxRequestNumPreSec: 10
variables:
name:
fn::invoke:
function: tencentcloud:getApiGatewayUsagePlans
arguments:
usagePlanName: ${plan.usagePlanName}
id:
fn::invoke:
function: tencentcloud:getApiGatewayUsagePlans
arguments:
usagePlanId: ${plan.apiGatewayUsagePlanId}
Using getApiGatewayUsagePlans
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 getApiGatewayUsagePlans(args: GetApiGatewayUsagePlansArgs, opts?: InvokeOptions): Promise<GetApiGatewayUsagePlansResult>
function getApiGatewayUsagePlansOutput(args: GetApiGatewayUsagePlansOutputArgs, opts?: InvokeOptions): Output<GetApiGatewayUsagePlansResult>def get_api_gateway_usage_plans(id: Optional[str] = None,
result_output_file: Optional[str] = None,
usage_plan_id: Optional[str] = None,
usage_plan_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiGatewayUsagePlansResult
def get_api_gateway_usage_plans_output(id: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
usage_plan_id: Optional[pulumi.Input[str]] = None,
usage_plan_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiGatewayUsagePlansResult]func GetApiGatewayUsagePlans(ctx *Context, args *GetApiGatewayUsagePlansArgs, opts ...InvokeOption) (*GetApiGatewayUsagePlansResult, error)
func GetApiGatewayUsagePlansOutput(ctx *Context, args *GetApiGatewayUsagePlansOutputArgs, opts ...InvokeOption) GetApiGatewayUsagePlansResultOutput> Note: This function is named GetApiGatewayUsagePlans in the Go SDK.
public static class GetApiGatewayUsagePlans
{
public static Task<GetApiGatewayUsagePlansResult> InvokeAsync(GetApiGatewayUsagePlansArgs args, InvokeOptions? opts = null)
public static Output<GetApiGatewayUsagePlansResult> Invoke(GetApiGatewayUsagePlansInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetApiGatewayUsagePlansResult> getApiGatewayUsagePlans(GetApiGatewayUsagePlansArgs args, InvokeOptions options)
public static Output<GetApiGatewayUsagePlansResult> getApiGatewayUsagePlans(GetApiGatewayUsagePlansArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getApiGatewayUsagePlans:getApiGatewayUsagePlans
arguments:
# arguments dictionaryThe following arguments are supported:
- Id string
- Result
Output stringFile - Used to save results.
- Usage
Plan stringId - ID of the usage plan.
- Usage
Plan stringName - Name of the usage plan.
- Id string
- Result
Output stringFile - Used to save results.
- Usage
Plan stringId - ID of the usage plan.
- Usage
Plan stringName - Name of the usage plan.
- id String
- result
Output StringFile - Used to save results.
- usage
Plan StringId - ID of the usage plan.
- usage
Plan StringName - Name of the usage plan.
- id string
- result
Output stringFile - Used to save results.
- usage
Plan stringId - ID of the usage plan.
- usage
Plan stringName - Name of the usage plan.
- id str
- result_
output_ strfile - Used to save results.
- usage_
plan_ strid - ID of the usage plan.
- usage_
plan_ strname - Name of the usage plan.
- id String
- result
Output StringFile - Used to save results.
- usage
Plan StringId - ID of the usage plan.
- usage
Plan StringName - Name of the usage plan.
getApiGatewayUsagePlans Result
The following output properties are available:
- Id string
- Lists
List<Get
Api Gateway Usage Plans List> - A list of usage plans.
- Result
Output stringFile - Usage
Plan stringId - ID of the usage plan.
- Usage
Plan stringName - Name of the usage plan.
- Id string
- Lists
[]Get
Api Gateway Usage Plans List - A list of usage plans.
- Result
Output stringFile - Usage
Plan stringId - ID of the usage plan.
- Usage
Plan stringName - Name of the usage plan.
- id String
- lists
List<Get
Api Gateway Usage Plans List> - A list of usage plans.
- result
Output StringFile - usage
Plan StringId - ID of the usage plan.
- usage
Plan StringName - Name of the usage plan.
- id string
- lists
Get
Api Gateway Usage Plans List[] - A list of usage plans.
- result
Output stringFile - usage
Plan stringId - ID of the usage plan.
- usage
Plan stringName - Name of the usage plan.
- id str
- lists
Sequence[Get
Api Gateway Usage Plans List] - A list of usage plans.
- result_
output_ strfile - usage_
plan_ strid - ID of the usage plan.
- usage_
plan_ strname - Name of the usage plan.
- id String
- lists List<Property Map>
- A list of usage plans.
- result
Output StringFile - usage
Plan StringId - ID of the usage plan.
- usage
Plan StringName - Name of the usage plan.
Supporting Types
GetApiGatewayUsagePlansList
- Create
Time string - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Max
Request doubleNum - Total number of requests allowed. Valid value formats:
-1,[1,99999999]. The default value is -1, which indicates no limit. - Max
Request doubleNum Pre Sec - Limit of requests per second. Valid values formats:
-1,[1,2000]. The default value is -1, which indicates no limit. - Modify
Time string - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Usage
Plan stringDesc - Custom usage plan description.
- Usage
Plan stringId - ID of the usage plan.
- Usage
Plan stringName - Name of the usage plan.
- Create
Time string - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Max
Request float64Num - Total number of requests allowed. Valid value formats:
-1,[1,99999999]. The default value is -1, which indicates no limit. - Max
Request float64Num Pre Sec - Limit of requests per second. Valid values formats:
-1,[1,2000]. The default value is -1, which indicates no limit. - Modify
Time string - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Usage
Plan stringDesc - Custom usage plan description.
- Usage
Plan stringId - ID of the usage plan.
- Usage
Plan stringName - Name of the usage plan.
- create
Time String - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - max
Request DoubleNum - Total number of requests allowed. Valid value formats:
-1,[1,99999999]. The default value is -1, which indicates no limit. - max
Request DoubleNum Pre Sec - Limit of requests per second. Valid values formats:
-1,[1,2000]. The default value is -1, which indicates no limit. - modify
Time String - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - usage
Plan StringDesc - Custom usage plan description.
- usage
Plan StringId - ID of the usage plan.
- usage
Plan StringName - Name of the usage plan.
- create
Time string - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - max
Request numberNum - Total number of requests allowed. Valid value formats:
-1,[1,99999999]. The default value is -1, which indicates no limit. - max
Request numberNum Pre Sec - Limit of requests per second. Valid values formats:
-1,[1,2000]. The default value is -1, which indicates no limit. - modify
Time string - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - usage
Plan stringDesc - Custom usage plan description.
- usage
Plan stringId - ID of the usage plan.
- usage
Plan stringName - Name of the usage plan.
- create_
time str - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - max_
request_ floatnum - Total number of requests allowed. Valid value formats:
-1,[1,99999999]. The default value is -1, which indicates no limit. - max_
request_ floatnum_ pre_ sec - Limit of requests per second. Valid values formats:
-1,[1,2000]. The default value is -1, which indicates no limit. - modify_
time str - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - usage_
plan_ strdesc - Custom usage plan description.
- usage_
plan_ strid - ID of the usage plan.
- usage_
plan_ strname - Name of the usage plan.
- create
Time String - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - max
Request NumberNum - Total number of requests allowed. Valid value formats:
-1,[1,99999999]. The default value is -1, which indicates no limit. - max
Request NumberNum Pre Sec - Limit of requests per second. Valid values formats:
-1,[1,2000]. The default value is -1, which indicates no limit. - modify
Time String - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - usage
Plan StringDesc - Custom usage plan description.
- usage
Plan StringId - ID of the usage plan.
- usage
Plan StringName - Name of the usage plan.
Package Details
- Repository
- tencentcloud tencentcloudstack/terraform-provider-tencentcloud
- License
- Notes
- This Pulumi package is based on the
tencentcloudTerraform Provider.
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
