tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
tencentcloud.getApiGatewayApiKeys
Start a Neo task
Explain and create a tencentcloud.getApiGatewayApiKeys resource
tencentcloud 1.82.34 published on Wednesday, Nov 5, 2025 by tencentcloudstack
Use this data source to query API gateway access keys.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as tencentcloud from "@pulumi/tencentcloud";
const test = new tencentcloud.ApiGatewayApiKey("test", {
secretName: "my_api_key",
status: "on",
});
const name = tencentcloud.getApiGatewayApiKeysOutput({
secretName: test.secretName,
});
const id = tencentcloud.getApiGatewayApiKeysOutput({
apiKeyId: test.apiGatewayApiKeyId,
});
import pulumi
import pulumi_tencentcloud as tencentcloud
test = tencentcloud.ApiGatewayApiKey("test",
secret_name="my_api_key",
status="on")
name = tencentcloud.get_api_gateway_api_keys_output(secret_name=test.secret_name)
id = tencentcloud.get_api_gateway_api_keys_output(api_key_id=test.api_gateway_api_key_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 {
test, err := tencentcloud.NewApiGatewayApiKey(ctx, "test", &tencentcloud.ApiGatewayApiKeyArgs{
SecretName: pulumi.String("my_api_key"),
Status: pulumi.String("on"),
})
if err != nil {
return err
}
_ = tencentcloud.GetApiGatewayApiKeysOutput(ctx, tencentcloud.GetApiGatewayApiKeysOutputArgs{
SecretName: test.SecretName,
}, nil)
_ = tencentcloud.GetApiGatewayApiKeysOutput(ctx, tencentcloud.GetApiGatewayApiKeysOutputArgs{
ApiKeyId: test.ApiGatewayApiKeyId,
}, nil)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Tencentcloud = Pulumi.Tencentcloud;
return await Deployment.RunAsync(() =>
{
var test = new Tencentcloud.ApiGatewayApiKey("test", new()
{
SecretName = "my_api_key",
Status = "on",
});
var name = Tencentcloud.GetApiGatewayApiKeys.Invoke(new()
{
SecretName = test.SecretName,
});
var id = Tencentcloud.GetApiGatewayApiKeys.Invoke(new()
{
ApiKeyId = test.ApiGatewayApiKeyId,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.tencentcloud.ApiGatewayApiKey;
import com.pulumi.tencentcloud.ApiGatewayApiKeyArgs;
import com.pulumi.tencentcloud.TencentcloudFunctions;
import com.pulumi.tencentcloud.inputs.GetApiGatewayApiKeysArgs;
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 test = new ApiGatewayApiKey("test", ApiGatewayApiKeyArgs.builder()
.secretName("my_api_key")
.status("on")
.build());
final var name = TencentcloudFunctions.getApiGatewayApiKeys(GetApiGatewayApiKeysArgs.builder()
.secretName(test.secretName())
.build());
final var id = TencentcloudFunctions.getApiGatewayApiKeys(GetApiGatewayApiKeysArgs.builder()
.apiKeyId(test.apiGatewayApiKeyId())
.build());
}
}
resources:
test:
type: tencentcloud:ApiGatewayApiKey
properties:
secretName: my_api_key
status: on
variables:
name:
fn::invoke:
function: tencentcloud:getApiGatewayApiKeys
arguments:
secretName: ${test.secretName}
id:
fn::invoke:
function: tencentcloud:getApiGatewayApiKeys
arguments:
apiKeyId: ${test.apiGatewayApiKeyId}
Using getApiGatewayApiKeys
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 getApiGatewayApiKeys(args: GetApiGatewayApiKeysArgs, opts?: InvokeOptions): Promise<GetApiGatewayApiKeysResult>
function getApiGatewayApiKeysOutput(args: GetApiGatewayApiKeysOutputArgs, opts?: InvokeOptions): Output<GetApiGatewayApiKeysResult>def get_api_gateway_api_keys(api_key_id: Optional[str] = None,
id: Optional[str] = None,
result_output_file: Optional[str] = None,
secret_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiGatewayApiKeysResult
def get_api_gateway_api_keys_output(api_key_id: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
result_output_file: Optional[pulumi.Input[str]] = None,
secret_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiGatewayApiKeysResult]func GetApiGatewayApiKeys(ctx *Context, args *GetApiGatewayApiKeysArgs, opts ...InvokeOption) (*GetApiGatewayApiKeysResult, error)
func GetApiGatewayApiKeysOutput(ctx *Context, args *GetApiGatewayApiKeysOutputArgs, opts ...InvokeOption) GetApiGatewayApiKeysResultOutput> Note: This function is named GetApiGatewayApiKeys in the Go SDK.
public static class GetApiGatewayApiKeys
{
public static Task<GetApiGatewayApiKeysResult> InvokeAsync(GetApiGatewayApiKeysArgs args, InvokeOptions? opts = null)
public static Output<GetApiGatewayApiKeysResult> Invoke(GetApiGatewayApiKeysInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetApiGatewayApiKeysResult> getApiGatewayApiKeys(GetApiGatewayApiKeysArgs args, InvokeOptions options)
public static Output<GetApiGatewayApiKeysResult> getApiGatewayApiKeys(GetApiGatewayApiKeysArgs args, InvokeOptions options)
fn::invoke:
function: tencentcloud:index/getApiGatewayApiKeys:getApiGatewayApiKeys
arguments:
# arguments dictionaryThe following arguments are supported:
- Api
Key stringId - Created API key ID, this field is exactly the same as ID.
- Id string
- Result
Output stringFile - Used to save results.
- Secret
Name string - Custom key name.
- Api
Key stringId - Created API key ID, this field is exactly the same as ID.
- Id string
- Result
Output stringFile - Used to save results.
- Secret
Name string - Custom key name.
- api
Key StringId - Created API key ID, this field is exactly the same as ID.
- id String
- result
Output StringFile - Used to save results.
- secret
Name String - Custom key name.
- api
Key stringId - Created API key ID, this field is exactly the same as ID.
- id string
- result
Output stringFile - Used to save results.
- secret
Name string - Custom key name.
- api_
key_ strid - Created API key ID, this field is exactly the same as ID.
- id str
- result_
output_ strfile - Used to save results.
- secret_
name str - Custom key name.
- api
Key StringId - Created API key ID, this field is exactly the same as ID.
- id String
- result
Output StringFile - Used to save results.
- secret
Name String - Custom key name.
getApiGatewayApiKeys Result
The following output properties are available:
- Id string
- Lists
List<Get
Api Gateway Api Keys List> - A list of API keys.
- Api
Key stringId - API key ID.
- Result
Output stringFile - Secret
Name string
- Id string
- Lists
[]Get
Api Gateway Api Keys List - A list of API keys.
- Api
Key stringId - API key ID.
- Result
Output stringFile - Secret
Name string
- id String
- lists
List<Get
Api Gateway Api Keys List> - A list of API keys.
- api
Key StringId - API key ID.
- result
Output StringFile - secret
Name String
- id string
- lists
Get
Api Gateway Api Keys List[] - A list of API keys.
- api
Key stringId - API key ID.
- result
Output stringFile - secret
Name string
- id str
- lists
Sequence[Get
Api Gateway Api Keys List] - A list of API keys.
- api_
key_ strid - API key ID.
- result_
output_ strfile - secret_
name str
- id String
- lists List<Property Map>
- A list of API keys.
- api
Key StringId - API key ID.
- result
Output StringFile - secret
Name String
Supporting Types
GetApiGatewayApiKeysList
- Access
Key stringSecret - Created API key.
- Api
Key stringId - Created API key ID, this field is exactly the same as ID.
- Create
Time string - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Modify
Time string - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Status string
- Key status. Values:
on,off.
- Access
Key stringSecret - Created API key.
- Api
Key stringId - Created API key ID, this field is exactly the same as ID.
- Create
Time string - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Modify
Time string - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - Status string
- Key status. Values:
on,off.
- access
Key StringSecret - Created API key.
- api
Key StringId - Created API key ID, this field is exactly the same as ID.
- create
Time String - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - modify
Time String - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - status String
- Key status. Values:
on,off.
- access
Key stringSecret - Created API key.
- api
Key stringId - Created API key ID, this field is exactly the same as ID.
- create
Time string - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - modify
Time string - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - status string
- Key status. Values:
on,off.
- access_
key_ strsecret - Created API key.
- api_
key_ strid - Created API key ID, this field is exactly the same as ID.
- create_
time str - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - modify_
time str - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - status str
- Key status. Values:
on,off.
- access
Key StringSecret - Created API key.
- api
Key StringId - Created API key ID, this field is exactly the same as ID.
- create
Time String - Creation time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - modify
Time String - Last modified time in the format of
YYYY-MM-DDThh:mm:ssZaccording to ISO 8601 standard. UTC time is used. - status String
- Key status. Values:
on,off.
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
