1. Packages
  2. Tencentcloud Provider
  3. API Docs
  4. getApiGatewayThrottlingApis
tencentcloud 1.81.182 published on Monday, Apr 14, 2025 by tencentcloudstack

tencentcloud.getApiGatewayThrottlingApis

Explore with Pulumi AI

Use this data source to query API gateway throttling APIs.

Example Usage

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

const service = new tencentcloud.ApiGatewayService("service", {
    serviceName: "niceservice",
    protocol: "http&https",
    serviceDesc: "your nice service",
    netTypes: [
        "INNER",
        "OUTER",
    ],
    ipVersion: "IPv4",
});
const api = new tencentcloud.ApiGatewayApi("api", {
    serviceId: service.apiGatewayServiceId,
    apiName: "tf_example",
    apiDesc: "my hello api update",
    authType: "SECRET",
    protocol: "HTTP",
    enableCors: true,
    requestConfigPath: "/user/info",
    requestConfigMethod: "POST",
    requestParameters: [{
        name: "email",
        position: "QUERY",
        type: "string",
        desc: "your email please?",
        defaultValue: "tom@qq.com",
        required: true,
    }],
    serviceConfigType: "HTTP",
    serviceConfigTimeout: 10,
    serviceConfigUrl: "http://www.tencent.com",
    serviceConfigPath: "/user",
    serviceConfigMethod: "POST",
    responseType: "XML",
    responseSuccessExample: "<note>success</note>",
    responseFailExample: "<note>fail</note>",
    responseErrorCodes: [{
        code: 10,
        msg: "system error",
        desc: "system error code",
        convertedCode: -10,
        needConvert: true,
    }],
    releaseLimit: 100,
    preLimit: 100,
    testLimit: 100,
});
const id = tencentcloud.getApiGatewayThrottlingApis({
    serviceId: tencentcloud_api_gateway_api.service_id,
});
const foo = tencentcloud.getApiGatewayThrottlingApis({
    serviceId: tencentcloud_api_gateway_api.service.service_id,
    environmentNames: [
        "release",
        "test",
    ],
});
Copy
import pulumi
import pulumi_tencentcloud as tencentcloud

service = tencentcloud.ApiGatewayService("service",
    service_name="niceservice",
    protocol="http&https",
    service_desc="your nice service",
    net_types=[
        "INNER",
        "OUTER",
    ],
    ip_version="IPv4")
api = tencentcloud.ApiGatewayApi("api",
    service_id=service.api_gateway_service_id,
    api_name="tf_example",
    api_desc="my hello api update",
    auth_type="SECRET",
    protocol="HTTP",
    enable_cors=True,
    request_config_path="/user/info",
    request_config_method="POST",
    request_parameters=[{
        "name": "email",
        "position": "QUERY",
        "type": "string",
        "desc": "your email please?",
        "default_value": "tom@qq.com",
        "required": True,
    }],
    service_config_type="HTTP",
    service_config_timeout=10,
    service_config_url="http://www.tencent.com",
    service_config_path="/user",
    service_config_method="POST",
    response_type="XML",
    response_success_example="<note>success</note>",
    response_fail_example="<note>fail</note>",
    response_error_codes=[{
        "code": 10,
        "msg": "system error",
        "desc": "system error code",
        "converted_code": -10,
        "need_convert": True,
    }],
    release_limit=100,
    pre_limit=100,
    test_limit=100)
id = tencentcloud.get_api_gateway_throttling_apis(service_id=tencentcloud_api_gateway_api["service_id"])
foo = tencentcloud.get_api_gateway_throttling_apis(service_id=tencentcloud_api_gateway_api["service"]["service_id"],
    environment_names=[
        "release",
        "test",
    ])
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 {
		service, err := tencentcloud.NewApiGatewayService(ctx, "service", &tencentcloud.ApiGatewayServiceArgs{
			ServiceName: pulumi.String("niceservice"),
			Protocol:    pulumi.String("http&https"),
			ServiceDesc: pulumi.String("your nice service"),
			NetTypes: pulumi.StringArray{
				pulumi.String("INNER"),
				pulumi.String("OUTER"),
			},
			IpVersion: pulumi.String("IPv4"),
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.NewApiGatewayApi(ctx, "api", &tencentcloud.ApiGatewayApiArgs{
			ServiceId:           service.ApiGatewayServiceId,
			ApiName:             pulumi.String("tf_example"),
			ApiDesc:             pulumi.String("my hello api update"),
			AuthType:            pulumi.String("SECRET"),
			Protocol:            pulumi.String("HTTP"),
			EnableCors:          pulumi.Bool(true),
			RequestConfigPath:   pulumi.String("/user/info"),
			RequestConfigMethod: pulumi.String("POST"),
			RequestParameters: tencentcloud.ApiGatewayApiRequestParameterArray{
				&tencentcloud.ApiGatewayApiRequestParameterArgs{
					Name:         pulumi.String("email"),
					Position:     pulumi.String("QUERY"),
					Type:         pulumi.String("string"),
					Desc:         pulumi.String("your email please?"),
					DefaultValue: pulumi.String("tom@qq.com"),
					Required:     pulumi.Bool(true),
				},
			},
			ServiceConfigType:      pulumi.String("HTTP"),
			ServiceConfigTimeout:   pulumi.Float64(10),
			ServiceConfigUrl:       pulumi.String("http://www.tencent.com"),
			ServiceConfigPath:      pulumi.String("/user"),
			ServiceConfigMethod:    pulumi.String("POST"),
			ResponseType:           pulumi.String("XML"),
			ResponseSuccessExample: pulumi.String("<note>success</note>"),
			ResponseFailExample:    pulumi.String("<note>fail</note>"),
			ResponseErrorCodes: tencentcloud.ApiGatewayApiResponseErrorCodeArray{
				&tencentcloud.ApiGatewayApiResponseErrorCodeArgs{
					Code:          pulumi.Float64(10),
					Msg:           pulumi.String("system error"),
					Desc:          pulumi.String("system error code"),
					ConvertedCode: pulumi.Float64(-10),
					NeedConvert:   pulumi.Bool(true),
				},
			},
			ReleaseLimit: pulumi.Float64(100),
			PreLimit:     pulumi.Float64(100),
			TestLimit:    pulumi.Float64(100),
		})
		if err != nil {
			return err
		}
		_, err = tencentcloud.GetApiGatewayThrottlingApis(ctx, &tencentcloud.GetApiGatewayThrottlingApisArgs{
			ServiceId: pulumi.StringRef(tencentcloud_api_gateway_api.Service_id),
		}, nil)
		if err != nil {
			return err
		}
		_, err = tencentcloud.GetApiGatewayThrottlingApis(ctx, &tencentcloud.GetApiGatewayThrottlingApisArgs{
			ServiceId: pulumi.StringRef(tencentcloud_api_gateway_api.Service.Service_id),
			EnvironmentNames: []string{
				"release",
				"test",
			},
		}, 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 service = new Tencentcloud.ApiGatewayService("service", new()
    {
        ServiceName = "niceservice",
        Protocol = "http&https",
        ServiceDesc = "your nice service",
        NetTypes = new[]
        {
            "INNER",
            "OUTER",
        },
        IpVersion = "IPv4",
    });

    var api = new Tencentcloud.ApiGatewayApi("api", new()
    {
        ServiceId = service.ApiGatewayServiceId,
        ApiName = "tf_example",
        ApiDesc = "my hello api update",
        AuthType = "SECRET",
        Protocol = "HTTP",
        EnableCors = true,
        RequestConfigPath = "/user/info",
        RequestConfigMethod = "POST",
        RequestParameters = new[]
        {
            new Tencentcloud.Inputs.ApiGatewayApiRequestParameterArgs
            {
                Name = "email",
                Position = "QUERY",
                Type = "string",
                Desc = "your email please?",
                DefaultValue = "tom@qq.com",
                Required = true,
            },
        },
        ServiceConfigType = "HTTP",
        ServiceConfigTimeout = 10,
        ServiceConfigUrl = "http://www.tencent.com",
        ServiceConfigPath = "/user",
        ServiceConfigMethod = "POST",
        ResponseType = "XML",
        ResponseSuccessExample = "<note>success</note>",
        ResponseFailExample = "<note>fail</note>",
        ResponseErrorCodes = new[]
        {
            new Tencentcloud.Inputs.ApiGatewayApiResponseErrorCodeArgs
            {
                Code = 10,
                Msg = "system error",
                Desc = "system error code",
                ConvertedCode = -10,
                NeedConvert = true,
            },
        },
        ReleaseLimit = 100,
        PreLimit = 100,
        TestLimit = 100,
    });

    var id = Tencentcloud.GetApiGatewayThrottlingApis.Invoke(new()
    {
        ServiceId = tencentcloud_api_gateway_api.Service_id,
    });

    var foo = Tencentcloud.GetApiGatewayThrottlingApis.Invoke(new()
    {
        ServiceId = tencentcloud_api_gateway_api.Service.Service_id,
        EnvironmentNames = new[]
        {
            "release",
            "test",
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ApiGatewayService;
import com.pulumi.tencentcloud.ApiGatewayServiceArgs;
import com.pulumi.tencentcloud.ApiGatewayApi;
import com.pulumi.tencentcloud.ApiGatewayApiArgs;
import com.pulumi.tencentcloud.inputs.ApiGatewayApiRequestParameterArgs;
import com.pulumi.tencentcloud.inputs.ApiGatewayApiResponseErrorCodeArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetApiGatewayThrottlingApisArgs;
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 service = new ApiGatewayService("service", ApiGatewayServiceArgs.builder()
            .serviceName("niceservice")
            .protocol("http&https")
            .serviceDesc("your nice service")
            .netTypes(            
                "INNER",
                "OUTER")
            .ipVersion("IPv4")
            .build());

        var api = new ApiGatewayApi("api", ApiGatewayApiArgs.builder()
            .serviceId(service.apiGatewayServiceId())
            .apiName("tf_example")
            .apiDesc("my hello api update")
            .authType("SECRET")
            .protocol("HTTP")
            .enableCors(true)
            .requestConfigPath("/user/info")
            .requestConfigMethod("POST")
            .requestParameters(ApiGatewayApiRequestParameterArgs.builder()
                .name("email")
                .position("QUERY")
                .type("string")
                .desc("your email please?")
                .defaultValue("tom@qq.com")
                .required(true)
                .build())
            .serviceConfigType("HTTP")
            .serviceConfigTimeout(10)
            .serviceConfigUrl("http://www.tencent.com")
            .serviceConfigPath("/user")
            .serviceConfigMethod("POST")
            .responseType("XML")
            .responseSuccessExample("<note>success</note>")
            .responseFailExample("<note>fail</note>")
            .responseErrorCodes(ApiGatewayApiResponseErrorCodeArgs.builder()
                .code(10)
                .msg("system error")
                .desc("system error code")
                .convertedCode(-10)
                .needConvert(true)
                .build())
            .releaseLimit(100)
            .preLimit(100)
            .testLimit(100)
            .build());

        final var id = TencentcloudFunctions.getApiGatewayThrottlingApis(GetApiGatewayThrottlingApisArgs.builder()
            .serviceId(tencentcloud_api_gateway_api.service_id())
            .build());

        final var foo = TencentcloudFunctions.getApiGatewayThrottlingApis(GetApiGatewayThrottlingApisArgs.builder()
            .serviceId(tencentcloud_api_gateway_api.service().service_id())
            .environmentNames(            
                "release",
                "test")
            .build());

    }
}
Copy
resources:
  service:
    type: tencentcloud:ApiGatewayService
    properties:
      serviceName: niceservice
      protocol: http&https
      serviceDesc: your nice service
      netTypes:
        - INNER
        - OUTER
      ipVersion: IPv4
  api:
    type: tencentcloud:ApiGatewayApi
    properties:
      serviceId: ${service.apiGatewayServiceId}
      apiName: tf_example
      apiDesc: my hello api update
      authType: SECRET
      protocol: HTTP
      enableCors: true
      requestConfigPath: /user/info
      requestConfigMethod: POST
      requestParameters:
        - name: email
          position: QUERY
          type: string
          desc: your email please?
          defaultValue: tom@qq.com
          required: true
      serviceConfigType: HTTP
      serviceConfigTimeout: 10
      serviceConfigUrl: http://www.tencent.com
      serviceConfigPath: /user
      serviceConfigMethod: POST
      responseType: XML
      responseSuccessExample: <note>success</note>
      responseFailExample: <note>fail</note>
      responseErrorCodes:
        - code: 10
          msg: system error
          desc: system error code
          convertedCode: -10
          needConvert: true
      releaseLimit: 100
      preLimit: 100
      testLimit: 100
variables:
  id:
    fn::invoke:
      function: tencentcloud:getApiGatewayThrottlingApis
      arguments:
        serviceId: ${tencentcloud_api_gateway_api.service_id}
  foo:
    fn::invoke:
      function: tencentcloud:getApiGatewayThrottlingApis
      arguments:
        serviceId: ${tencentcloud_api_gateway_api.service.service_id}
        environmentNames:
          - release
          - test
Copy

Using getApiGatewayThrottlingApis

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 getApiGatewayThrottlingApis(args: GetApiGatewayThrottlingApisArgs, opts?: InvokeOptions): Promise<GetApiGatewayThrottlingApisResult>
function getApiGatewayThrottlingApisOutput(args: GetApiGatewayThrottlingApisOutputArgs, opts?: InvokeOptions): Output<GetApiGatewayThrottlingApisResult>
Copy
def get_api_gateway_throttling_apis(environment_names: Optional[Sequence[str]] = None,
                                    id: Optional[str] = None,
                                    result_output_file: Optional[str] = None,
                                    service_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetApiGatewayThrottlingApisResult
def get_api_gateway_throttling_apis_output(environment_names: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                    id: Optional[pulumi.Input[str]] = None,
                                    result_output_file: Optional[pulumi.Input[str]] = None,
                                    service_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetApiGatewayThrottlingApisResult]
Copy
func GetApiGatewayThrottlingApis(ctx *Context, args *GetApiGatewayThrottlingApisArgs, opts ...InvokeOption) (*GetApiGatewayThrottlingApisResult, error)
func GetApiGatewayThrottlingApisOutput(ctx *Context, args *GetApiGatewayThrottlingApisOutputArgs, opts ...InvokeOption) GetApiGatewayThrottlingApisResultOutput
Copy

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

public static class GetApiGatewayThrottlingApis 
{
    public static Task<GetApiGatewayThrottlingApisResult> InvokeAsync(GetApiGatewayThrottlingApisArgs args, InvokeOptions? opts = null)
    public static Output<GetApiGatewayThrottlingApisResult> Invoke(GetApiGatewayThrottlingApisInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetApiGatewayThrottlingApisResult> getApiGatewayThrottlingApis(GetApiGatewayThrottlingApisArgs args, InvokeOptions options)
public static Output<GetApiGatewayThrottlingApisResult> getApiGatewayThrottlingApis(GetApiGatewayThrottlingApisArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: tencentcloud:index/getApiGatewayThrottlingApis:getApiGatewayThrottlingApis
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

EnvironmentNames List<string>
Environment list.
Id string
ResultOutputFile string
Used to save results.
ServiceId string
Unique service ID of API.
EnvironmentNames []string
Environment list.
Id string
ResultOutputFile string
Used to save results.
ServiceId string
Unique service ID of API.
environmentNames List<String>
Environment list.
id String
resultOutputFile String
Used to save results.
serviceId String
Unique service ID of API.
environmentNames string[]
Environment list.
id string
resultOutputFile string
Used to save results.
serviceId string
Unique service ID of API.
environment_names Sequence[str]
Environment list.
id str
result_output_file str
Used to save results.
service_id str
Unique service ID of API.
environmentNames List<String>
Environment list.
id String
resultOutputFile String
Used to save results.
serviceId String
Unique service ID of API.

getApiGatewayThrottlingApis Result

The following output properties are available:

Id string
Lists List<GetApiGatewayThrottlingApisList>
A list of policies bound to API.
EnvironmentNames List<string>
ResultOutputFile string
ServiceId string
Unique service ID of API.
Id string
Lists []GetApiGatewayThrottlingApisList
A list of policies bound to API.
EnvironmentNames []string
ResultOutputFile string
ServiceId string
Unique service ID of API.
id String
lists List<GetApiGatewayThrottlingApisList>
A list of policies bound to API.
environmentNames List<String>
resultOutputFile String
serviceId String
Unique service ID of API.
id string
lists GetApiGatewayThrottlingApisList[]
A list of policies bound to API.
environmentNames string[]
resultOutputFile string
serviceId string
Unique service ID of API.
id str
lists Sequence[GetApiGatewayThrottlingApisList]
A list of policies bound to API.
environment_names Sequence[str]
result_output_file str
service_id str
Unique service ID of API.
id String
lists List<Property Map>
A list of policies bound to API.
environmentNames List<String>
resultOutputFile String
serviceId String
Unique service ID of API.

Supporting Types

GetApiGatewayThrottlingApisList

ApiEnvironmentStrategies This property is required. List<GetApiGatewayThrottlingApisListApiEnvironmentStrategy>
List of throttling policies bound to API.
ServiceId This property is required. string
Unique service ID of API.
ApiEnvironmentStrategies This property is required. []GetApiGatewayThrottlingApisListApiEnvironmentStrategy
List of throttling policies bound to API.
ServiceId This property is required. string
Unique service ID of API.
apiEnvironmentStrategies This property is required. List<GetApiGatewayThrottlingApisListApiEnvironmentStrategy>
List of throttling policies bound to API.
serviceId This property is required. String
Unique service ID of API.
apiEnvironmentStrategies This property is required. GetApiGatewayThrottlingApisListApiEnvironmentStrategy[]
List of throttling policies bound to API.
serviceId This property is required. string
Unique service ID of API.
api_environment_strategies This property is required. Sequence[GetApiGatewayThrottlingApisListApiEnvironmentStrategy]
List of throttling policies bound to API.
service_id This property is required. str
Unique service ID of API.
apiEnvironmentStrategies This property is required. List<Property Map>
List of throttling policies bound to API.
serviceId This property is required. String
Unique service ID of API.

GetApiGatewayThrottlingApisListApiEnvironmentStrategy

ApiId This property is required. string
Unique API ID.
ApiName This property is required. string
Custom API name.
Method This property is required. string
API method.
Path This property is required. string
API path.
StrategyLists This property is required. List<GetApiGatewayThrottlingApisListApiEnvironmentStrategyStrategyList>
Environment throttling information.
ApiId This property is required. string
Unique API ID.
ApiName This property is required. string
Custom API name.
Method This property is required. string
API method.
Path This property is required. string
API path.
StrategyLists This property is required. []GetApiGatewayThrottlingApisListApiEnvironmentStrategyStrategyList
Environment throttling information.
apiId This property is required. String
Unique API ID.
apiName This property is required. String
Custom API name.
method This property is required. String
API method.
path This property is required. String
API path.
strategyLists This property is required. List<GetApiGatewayThrottlingApisListApiEnvironmentStrategyStrategyList>
Environment throttling information.
apiId This property is required. string
Unique API ID.
apiName This property is required. string
Custom API name.
method This property is required. string
API method.
path This property is required. string
API path.
strategyLists This property is required. GetApiGatewayThrottlingApisListApiEnvironmentStrategyStrategyList[]
Environment throttling information.
api_id This property is required. str
Unique API ID.
api_name This property is required. str
Custom API name.
method This property is required. str
API method.
path This property is required. str
API path.
strategy_lists This property is required. Sequence[GetApiGatewayThrottlingApisListApiEnvironmentStrategyStrategyList]
Environment throttling information.
apiId This property is required. String
Unique API ID.
apiName This property is required. String
Custom API name.
method This property is required. String
API method.
path This property is required. String
API path.
strategyLists This property is required. List<Property Map>
Environment throttling information.

GetApiGatewayThrottlingApisListApiEnvironmentStrategyStrategyList

EnvironmentName This property is required. string
Environment name.
Quota This property is required. double
Throttling value.
EnvironmentName This property is required. string
Environment name.
Quota This property is required. float64
Throttling value.
environmentName This property is required. String
Environment name.
quota This property is required. Double
Throttling value.
environmentName This property is required. string
Environment name.
quota This property is required. number
Throttling value.
environment_name This property is required. str
Environment name.
quota This property is required. float
Throttling value.
environmentName This property is required. String
Environment name.
quota This property is required. Number
Throttling value.

Package Details

Repository
tencentcloud tencentcloudstack/terraform-provider-tencentcloud
License
Notes
This Pulumi package is based on the tencentcloud Terraform Provider.