tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getApiGatewayPlugins
Start a Neo task
Explain and create a tencentcloud.getApiGatewayPlugins resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query detailed information of apigateway plugin
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const exampleApiGatewayService = new tencentcloud.ApiGatewayService("example", {
serviceName: "tf_example",
protocol: "http&https",
serviceDesc: "desc.",
netTypes: [
"INNER",
"OUTER",
],
ipVersion: "IPv4",
tags: {
testKey: "testValue",
},
releaseLimit: 500,
preLimit: 500,
testLimit: 500,
});
const exampleApiGatewayApi = new tencentcloud.ApiGatewayApi("example", {
serviceId: exampleApiGatewayService.apiGatewayServiceId,
apiName: "hello",
apiDesc: "my hello api",
authType: "NONE",
protocol: "HTTP",
enableCors: true,
requestConfigPath: "/user/info",
requestConfigMethod: "GET",
requestParameters: [{
name: "name",
position: "QUERY",
type: "string",
desc: "who are you?",
defaultValue: "tom",
required: true,
}],
serviceConfigType: "HTTP",
serviceConfigTimeout: 15,
serviceConfigUrl: "http://www.qq.com",
serviceConfigPath: "/user",
serviceConfigMethod: "GET",
responseType: "HTML",
responseSuccessExample: "success",
responseFailExample: "fail",
responseErrorCodes: [{
code: 500,
msg: "system error",
desc: "system error code",
convertedCode: 5000,
needConvert: true,
}],
});
const exampleApiGatewayServiceRelease = new tencentcloud.ApiGatewayServiceRelease("example", {
serviceId: exampleApiGatewayApi.serviceId,
environmentName: "release",
releaseDesc: "desc.",
});
const exampleApiGatewayPlugin = new tencentcloud.ApiGatewayPlugin("example", {
pluginName: "tf-example",
pluginType: "IPControl",
pluginData: JSON.stringify({
type: "white_list",
blocks: "1.1.1.1",
}),
description: "desc.",
});
const example = tencentcloud.getApiGatewayPluginsOutput({
serviceId: exampleApiGatewayServiceRelease.serviceId,
pluginId: exampleApiGatewayPlugin.apiGatewayPluginId,
environmentName: "release",
});
import pulumi
import json
import pulumi_tencentcloud as tencentcloud
example_api_gateway_service = tencentcloud.ApiGatewayService("example",
service_name="tf_example",
protocol="http&https",
service_desc="desc.",
net_types=[
"INNER",
"OUTER",
],
ip_version="IPv4",
tags={
"testKey": "testValue",
},
release_limit=500,
pre_limit=500,
test_limit=500)
example_api_gateway_api = tencentcloud.ApiGatewayApi("example",
service_id=example_api_gateway_service.api_gateway_service_id,
api_name="hello",
api_desc="my hello api",
auth_type="NONE",
protocol="HTTP",
enable_cors=True,
request_config_path="/user/info",
request_config_method="GET",
request_parameters=[{
"name": "name",
"position": "QUERY",
"type": "string",
"desc": "who are you?",
"default_value": "tom",
"required": True,
}],
service_config_type="HTTP",
service_config_timeout=15,
service_config_url="http://www.qq.com",
service_config_path="/user",
service_config_method="GET",
response_type="HTML",
response_success_example="success",
response_fail_example="fail",
response_error_codes=[{
"code": 500,
"msg": "system error",
"desc": "system error code",
"converted_code": 5000,
"need_convert": True,
}])
example_api_gateway_service_release = tencentcloud.ApiGatewayServiceRelease("example",
service_id=example_api_gateway_api.service_id,
environment_name="release",
release_desc="desc.")
example_api_gateway_plugin = tencentcloud.ApiGatewayPlugin("example",
plugin_name="tf-example",
plugin_type="IPControl",
plugin_data=json.dumps({
"type": "white_list",
"blocks": "1.1.1.1",
}),
description="desc.")
example = tencentcloud.get_api_gateway_plugins_output(service_id=example_api_gateway_service_release.service_id,
plugin_id=example_api_gateway_plugin.api_gateway_plugin_id,
environment_name="release")
package main
import (
"encoding/json"
"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 {
exampleApiGatewayService, err := tencentcloud.NewApiGatewayService(ctx, "example", &tencentcloud.ApiGatewayServiceArgs{
ServiceName: pulumi.String("tf_example"),
Protocol: pulumi.String("http&https"),
ServiceDesc: pulumi.String("desc."),
NetTypes: pulumi.StringArray{
pulumi.String("INNER"),
pulumi.String("OUTER"),
},
IpVersion: pulumi.String("IPv4"),
Tags: pulumi.StringMap{
"testKey": pulumi.String("testValue"),
},
ReleaseLimit: pulumi.Float64(500),
PreLimit: pulumi.Float64(500),
TestLimit: pulumi.Float64(500),
})
if err != nil {
return err
}
exampleApiGatewayApi, err := tencentcloud.NewApiGatewayApi(ctx, "example", &tencentcloud.ApiGatewayApiArgs{
ServiceId: exampleApiGatewayService.ApiGatewayServiceId,
ApiName: pulumi.String("hello"),
ApiDesc: pulumi.String("my hello api"),
AuthType: pulumi.String("NONE"),
Protocol: pulumi.String("HTTP"),
EnableCors: pulumi.Bool(true),
RequestConfigPath: pulumi.String("/user/info"),
RequestConfigMethod: pulumi.String("GET"),
RequestParameters: tencentcloud.ApiGatewayApiRequestParameterArray{
&tencentcloud.ApiGatewayApiRequestParameterArgs{
Name: pulumi.String("name"),
Position: pulumi.String("QUERY"),
Type: pulumi.String("string"),
Desc: pulumi.String("who are you?"),
DefaultValue: pulumi.String("tom"),
Required: pulumi.Bool(true),
},
},
ServiceConfigType: pulumi.String("HTTP"),
ServiceConfigTimeout: pulumi.Float64(15),
ServiceConfigUrl: pulumi.String("http://www.qq.com"),
ServiceConfigPath: pulumi.String("/user"),
ServiceConfigMethod: pulumi.String("GET"),
ResponseType: pulumi.String("HTML"),
ResponseSuccessExample: pulumi.String("success"),
ResponseFailExample: pulumi.String("fail"),
ResponseErrorCodes: tencentcloud.ApiGatewayApiResponseErrorCodeArray{
&tencentcloud.ApiGatewayApiResponseErrorCodeArgs{
Code: pulumi.Float64(500),
Msg: pulumi.String("system error"),
Desc: pulumi.String("system error code"),
ConvertedCode: pulumi.Float64(5000),
NeedConvert: pulumi.Bool(true),
},
},
})
if err != nil {
return err
}
exampleApiGatewayServiceRelease, err := tencentcloud.NewApiGatewayServiceRelease(ctx, "example", &tencentcloud.ApiGatewayServiceReleaseArgs{
ServiceId: exampleApiGatewayApi.ServiceId,
EnvironmentName: pulumi.String("release"),
ReleaseDesc: pulumi.String("desc."),
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"type": "white_list",
"blocks": "1.1.1.1",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
exampleApiGatewayPlugin, err := tencentcloud.NewApiGatewayPlugin(ctx, "example", &tencentcloud.ApiGatewayPluginArgs{
PluginName: pulumi.String("tf-example"),
PluginType: pulumi.String("IPControl"),
PluginData: pulumi.String(json0),
Description: pulumi.String("desc."),
})
if err != nil {
return err
}
_ = tencentcloud.LookupApiGatewayPluginsOutput(ctx, tencentcloud.GetApiGatewayPluginsOutputArgs{
ServiceId: exampleApiGatewayServiceRelease.ServiceId,
PluginId: exampleApiGatewayPlugin.ApiGatewayPluginId,
EnvironmentName: pulumi.String("release"),
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var exampleApiGatewayService = new Tencentcloud.ApiGatewayService("example", new()
{
ServiceName = "tf_example",
Protocol = "http&https",
ServiceDesc = "desc.",
NetTypes = new[]
{
"INNER",
"OUTER",
},
IpVersion = "IPv4",
Tags =
{
{ "testKey", "testValue" },
},
ReleaseLimit = 500,
PreLimit = 500,
TestLimit = 500,
});
var exampleApiGatewayApi = new Tencentcloud.ApiGatewayApi("example", new()
{
ServiceId = exampleApiGatewayService.ApiGatewayServiceId,
ApiName = "hello",
ApiDesc = "my hello api",
AuthType = "NONE",
Protocol = "HTTP",
EnableCors = true,
RequestConfigPath = "/user/info",
RequestConfigMethod = "GET",
RequestParameters = new[]
{
new Tencentcloud.Inputs.ApiGatewayApiRequestParameterArgs
{
Name = "name",
Position = "QUERY",
Type = "string",
Desc = "who are you?",
DefaultValue = "tom",
Required = true,
},
},
ServiceConfigType = "HTTP",
ServiceConfigTimeout = 15,
ServiceConfigUrl = "http://www.qq.com",
ServiceConfigPath = "/user",
ServiceConfigMethod = "GET",
ResponseType = "HTML",
ResponseSuccessExample = "success",
ResponseFailExample = "fail",
ResponseErrorCodes = new[]
{
new Tencentcloud.Inputs.ApiGatewayApiResponseErrorCodeArgs
{
Code = 500,
Msg = "system error",
Desc = "system error code",
ConvertedCode = 5000,
NeedConvert = true,
},
},
});
var exampleApiGatewayServiceRelease = new Tencentcloud.ApiGatewayServiceRelease("example", new()
{
ServiceId = exampleApiGatewayApi.ServiceId,
EnvironmentName = "release",
ReleaseDesc = "desc.",
});
var exampleApiGatewayPlugin = new Tencentcloud.ApiGatewayPlugin("example", new()
{
PluginName = "tf-example",
PluginType = "IPControl",
PluginData = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["type"] = "white_list",
["blocks"] = "1.1.1.1",
}),
Description = "desc.",
});
var example = Tencentcloud.GetApiGatewayPlugins.Invoke(new()
{
ServiceId = exampleApiGatewayServiceRelease.ServiceId,
PluginId = exampleApiGatewayPlugin.ApiGatewayPluginId,
EnvironmentName = "release",
});
});
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.ApiGatewayServiceRelease;
import com.pulumi.tencentcloud.ApiGatewayServiceReleaseArgs;
import com.pulumi.tencentcloud.ApiGatewayPlugin;
import com.pulumi.tencentcloud.ApiGatewayPluginArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetApiGatewayPluginsArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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 exampleApiGatewayService = new ApiGatewayService("exampleApiGatewayService", ApiGatewayServiceArgs.builder()
.serviceName("tf_example")
.protocol("http&https")
.serviceDesc("desc.")
.netTypes(
"INNER",
"OUTER")
.ipVersion("IPv4")
.tags(Map.of("testKey", "testValue"))
.releaseLimit(500.0)
.preLimit(500.0)
.testLimit(500.0)
.build());
var exampleApiGatewayApi = new ApiGatewayApi("exampleApiGatewayApi", ApiGatewayApiArgs.builder()
.serviceId(exampleApiGatewayService.apiGatewayServiceId())
.apiName("hello")
.apiDesc("my hello api")
.authType("NONE")
.protocol("HTTP")
.enableCors(true)
.requestConfigPath("/user/info")
.requestConfigMethod("GET")
.requestParameters(ApiGatewayApiRequestParameterArgs.builder()
.name("name")
.position("QUERY")
.type("string")
.desc("who are you?")
.defaultValue("tom")
.required(true)
.build())
.serviceConfigType("HTTP")
.serviceConfigTimeout(15.0)
.serviceConfigUrl("http://www.qq.com")
.serviceConfigPath("/user")
.serviceConfigMethod("GET")
.responseType("HTML")
.responseSuccessExample("success")
.responseFailExample("fail")
.responseErrorCodes(ApiGatewayApiResponseErrorCodeArgs.builder()
.code(500.0)
.msg("system error")
.desc("system error code")
.convertedCode(5000.0)
.needConvert(true)
.build())
.build());
var exampleApiGatewayServiceRelease = new ApiGatewayServiceRelease("exampleApiGatewayServiceRelease", ApiGatewayServiceReleaseArgs.builder()
.serviceId(exampleApiGatewayApi.serviceId())
.environmentName("release")
.releaseDesc("desc.")
.build());
var exampleApiGatewayPlugin = new ApiGatewayPlugin("exampleApiGatewayPlugin", ApiGatewayPluginArgs.builder()
.pluginName("tf-example")
.pluginType("IPControl")
.pluginData(serializeJson(
jsonObject(
jsonProperty("type", "white_list"),
jsonProperty("blocks", "1.1.1.1")
)))
.description("desc.")
.build());
final var example = TencentcloudFunctions.getApiGatewayPlugins(GetApiGatewayPluginsArgs.builder()
.serviceId(exampleApiGatewayServiceRelease.serviceId())
.pluginId(exampleApiGatewayPlugin.apiGatewayPluginId())
.environmentName("release")
.build());
}
}
resources:
exampleApiGatewayService:
type: tencentcloud:ApiGatewayService
name: example
properties:
serviceName: tf_example
protocol: http&https
serviceDesc: desc.
netTypes:
- INNER
- OUTER
ipVersion: IPv4
tags:
testKey: testValue
releaseLimit: 500
preLimit: 500
testLimit: 500
exampleApiGatewayApi:
type: tencentcloud:ApiGatewayApi
name: example
properties:
serviceId: ${exampleApiGatewayService.apiGatewayServiceId}
apiName: hello
apiDesc: my hello api
authType: NONE
protocol: HTTP
enableCors: true
requestConfigPath: /user/info
requestConfigMethod: GET
requestParameters:
- name: name
position: QUERY
type: string
desc: who are you?
defaultValue: tom
required: true
serviceConfigType: HTTP
serviceConfigTimeout: 15
serviceConfigUrl: http://www.qq.com
serviceConfigPath: /user
serviceConfigMethod: GET
responseType: HTML
responseSuccessExample: success
responseFailExample: fail
responseErrorCodes:
- code: 500
msg: system error
desc: system error code
convertedCode: 5000
needConvert: true
exampleApiGatewayServiceRelease:
type: tencentcloud:ApiGatewayServiceRelease
name: example
properties:
serviceId: ${exampleApiGatewayApi.serviceId}
environmentName: release
releaseDesc: desc.
exampleApiGatewayPlugin:
type: tencentcloud:ApiGatewayPlugin
name: example
properties:
pluginName: tf-example
pluginType: IPControl
pluginData:
fn::toJSON:
type: white_list
blocks: 1.1.1.1
description: desc.
variables:
example:
fn::invoke:
function: tencentcloud:getApiGatewayPlugins
arguments:
serviceId: ${exampleApiGatewayServiceRelease.serviceId}
pluginId: ${exampleApiGatewayPlugin.apiGatewayPluginId}
environmentName: release
Using getApiGatewayPlugins
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 getApiGatewayPlugins(args: GetApiGatewayPluginsArgs, opts?: InvokeOptions): Promise<GetApiGatewayPluginsResult>
function getApiGatewayPluginsOutput(args: GetApiGatewayPluginsOutputArgs, opts?: InvokeOptions): Output<GetApiGatewayPluginsResult>def get_api_gateway_plugins(environment_name: Optional[str] = None,
id: Optional[str] = None,
plugin_id: Optional[str] = None,
result_output_file: Optional[str] = None,
service_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiGatewayPluginsResult
def get_api_gateway_plugins_output(environment_name: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
plugin_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[GetApiGatewayPluginsResult]func LookupApiGatewayPlugins(ctx *Context, args *LookupApiGatewayPluginsArgs, opts ...InvokeOption) (*LookupApiGatewayPluginsResult, error)
func LookupApiGatewayPluginsOutput(ctx *Context, args *LookupApiGatewayPluginsOutputArgs, opts ...InvokeOption) LookupApiGatewayPluginsResultOutput> Note: This function is named LookupApiGatewayPlugins in the Go SDK.
public static class GetApiGatewayPlugins
{
public static Task<GetApiGatewayPluginsResult> InvokeAsync(GetApiGatewayPluginsArgs args, InvokeOptions? opts = null)
public static Output<GetApiGatewayPluginsResult> Invoke(GetApiGatewayPluginsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetApiGatewayPluginsResult> getApiGatewayPlugins(GetApiGatewayPluginsArgs args, InvokeOptions options)
public static Output<GetApiGatewayPluginsResult> getApiGatewayPlugins(GetApiGatewayPluginsArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getApiGatewayPlugins:getApiGatewayPlugins
arguments:
# arguments dictionaryThe following arguments are supported:
- Environment
Name string - Environmental information.
- Plugin
Id string - The plugin ID to query.
- Service
Id string - The service ID to query.
- Id string
- Result
Output stringFile - Used to save results.
- Environment
Name string - Environmental information.
- Plugin
Id string - The plugin ID to query.
- Service
Id string - The service ID to query.
- Id string
- Result
Output stringFile - Used to save results.
- environment
Name String - Environmental information.
- plugin
Id String - The plugin ID to query.
- service
Id String - The service ID to query.
- id String
- result
Output StringFile - Used to save results.
- environment
Name string - Environmental information.
- plugin
Id string - The plugin ID to query.
- service
Id string - The service ID to query.
- id string
- result
Output stringFile - Used to save results.
- environment_
name str - Environmental information.
- plugin_
id str - The plugin ID to query.
- service_
id str - The service ID to query.
- id str
- result_
output_ strfile - Used to save results.
- environment
Name String - Environmental information.
- plugin
Id String - The plugin ID to query.
- service
Id String - The service ID to query.
- id String
- result
Output StringFile - Used to save results.
getApiGatewayPlugins Result
The following output properties are available:
- Environment
Name string - Id string
- Plugin
Id string - Results
List<Get
Api Gateway Plugins Result> - List of plugin related APIs.
- Service
Id string - Result
Output stringFile
- Environment
Name string - Id string
- Plugin
Id string - Results
[]Get
Api Gateway Plugins Result - List of plugin related APIs.
- Service
Id string - Result
Output stringFile
- environment
Name String - id String
- plugin
Id String - results
List<Get
Api Gateway Plugins Result> - List of plugin related APIs.
- service
Id String - result
Output StringFile
- environment
Name string - id string
- plugin
Id string - results
Get
Api Gateway Plugins Result[] - List of plugin related APIs.
- service
Id string - result
Output stringFile
- environment_
name str - id str
- plugin_
id str - results
Sequence[Get
Api Gateway Plugins Result] - List of plugin related APIs.
- service_
id str - result_
output_ strfile
- environment
Name String - id String
- plugin
Id String - results List<Property Map>
- List of plugin related APIs.
- service
Id String - result
Output StringFile
Supporting Types
GetApiGatewayPluginsResult
- Api
Id string - API ID.
- Api
Name string - API name.
- Api
Type string - API type.
- Attached
Other boolPlugin - Whether the API is bound to other plugins.Note: This field may return null, indicating that a valid value cannot be obtained.
- Is
Attached bool - Whether the API is bound to the current plugin.Note: This field may return null, indicating that a valid value cannot be obtained.
- Method string
- API method.
- Path string
- API path.
- Api
Id string - API ID.
- Api
Name string - API name.
- Api
Type string - API type.
- Attached
Other boolPlugin - Whether the API is bound to other plugins.Note: This field may return null, indicating that a valid value cannot be obtained.
- Is
Attached bool - Whether the API is bound to the current plugin.Note: This field may return null, indicating that a valid value cannot be obtained.
- Method string
- API method.
- Path string
- API path.
- api
Id String - API ID.
- api
Name String - API name.
- api
Type String - API type.
- attached
Other BooleanPlugin - Whether the API is bound to other plugins.Note: This field may return null, indicating that a valid value cannot be obtained.
- is
Attached Boolean - Whether the API is bound to the current plugin.Note: This field may return null, indicating that a valid value cannot be obtained.
- method String
- API method.
- path String
- API path.
- api
Id string - API ID.
- api
Name string - API name.
- api
Type string - API type.
- attached
Other booleanPlugin - Whether the API is bound to other plugins.Note: This field may return null, indicating that a valid value cannot be obtained.
- is
Attached boolean - Whether the API is bound to the current plugin.Note: This field may return null, indicating that a valid value cannot be obtained.
- method string
- API method.
- path string
- API path.
- api_
id str - API ID.
- api_
name str - API name.
- api_
type str - API type.
- attached_
other_ boolplugin - Whether the API is bound to other plugins.Note: This field may return null, indicating that a valid value cannot be obtained.
- is_
attached bool - Whether the API is bound to the current plugin.Note: This field may return null, indicating that a valid value cannot be obtained.
- method str
- API method.
- path str
- API path.
- api
Id String - API ID.
- api
Name String - API name.
- api
Type String - API type.
- attached
Other BooleanPlugin - Whether the API is bound to other plugins.Note: This field may return null, indicating that a valid value cannot be obtained.
- is
Attached Boolean - Whether the API is bound to the current plugin.Note: This field may return null, indicating that a valid value cannot be obtained.
- method String
- API method.
- path String
- API path.
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
