We recommend using Azure Native.
Azure v6.28.0 published on Friday, Oct 3, 2025 by Pulumi
azure.nginx.getApiKey
Start a Neo task
Explain and create an azure.nginx.getApiKey resource
Use this data source to access information about an existing NGINX Dataplane API Key.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.nginx.getApiKey({
name: "existing",
nginxDeploymentId: exampleAzurermNginxDeployment.id,
});
export const id = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.nginx.get_api_key(name="existing",
nginx_deployment_id=example_azurerm_nginx_deployment["id"])
pulumi.export("id", example.id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/nginx"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := nginx.LookupApiKey(ctx, &nginx.LookupApiKeyArgs{
Name: "existing",
NginxDeploymentId: exampleAzurermNginxDeployment.Id,
}, nil)
if err != nil {
return err
}
ctx.Export("id", example.Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Nginx.GetApiKey.Invoke(new()
{
Name = "existing",
NginxDeploymentId = exampleAzurermNginxDeployment.Id,
});
return new Dictionary<string, object?>
{
["id"] = example.Apply(getApiKeyResult => getApiKeyResult.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.nginx.NginxFunctions;
import com.pulumi.azure.nginx.inputs.GetApiKeyArgs;
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 example = NginxFunctions.getApiKey(GetApiKeyArgs.builder()
.name("existing")
.nginxDeploymentId(exampleAzurermNginxDeployment.id())
.build());
ctx.export("id", example.id());
}
}
variables:
example:
fn::invoke:
function: azure:nginx:getApiKey
arguments:
name: existing
nginxDeploymentId: ${exampleAzurermNginxDeployment.id}
outputs:
id: ${example.id}
API Providers
This data source uses the following Azure API Providers:
Nginx.NginxPlus- 2024-11-01-preview
Using getApiKey
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 getApiKey(args: GetApiKeyArgs, opts?: InvokeOptions): Promise<GetApiKeyResult>
function getApiKeyOutput(args: GetApiKeyOutputArgs, opts?: InvokeOptions): Output<GetApiKeyResult>def get_api_key(name: Optional[str] = None,
nginx_deployment_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetApiKeyResult
def get_api_key_output(name: Optional[pulumi.Input[str]] = None,
nginx_deployment_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetApiKeyResult]func LookupApiKey(ctx *Context, args *LookupApiKeyArgs, opts ...InvokeOption) (*LookupApiKeyResult, error)
func LookupApiKeyOutput(ctx *Context, args *LookupApiKeyOutputArgs, opts ...InvokeOption) LookupApiKeyResultOutput> Note: This function is named LookupApiKey in the Go SDK.
public static class GetApiKey
{
public static Task<GetApiKeyResult> InvokeAsync(GetApiKeyArgs args, InvokeOptions? opts = null)
public static Output<GetApiKeyResult> Invoke(GetApiKeyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
public static Output<GetApiKeyResult> getApiKey(GetApiKeyArgs args, InvokeOptions options)
fn::invoke:
function: azure:nginx/getApiKey:getApiKey
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The name of the NGINX Dataplane API Key.
- Nginx
Deployment stringId - The ID of the NGINX Deployment that the API key is associated with.
- Name string
- The name of the NGINX Dataplane API Key.
- Nginx
Deployment stringId - The ID of the NGINX Deployment that the API key is associated with.
- name String
- The name of the NGINX Dataplane API Key.
- nginx
Deployment StringId - The ID of the NGINX Deployment that the API key is associated with.
- name string
- The name of the NGINX Dataplane API Key.
- nginx
Deployment stringId - The ID of the NGINX Deployment that the API key is associated with.
- name str
- The name of the NGINX Dataplane API Key.
- nginx_
deployment_ strid - The ID of the NGINX Deployment that the API key is associated with.
- name String
- The name of the NGINX Dataplane API Key.
- nginx
Deployment StringId - The ID of the NGINX Deployment that the API key is associated with.
getApiKey Result
The following output properties are available:
- End
Date stringTime - The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
- Hint string
- The first three characters of the secret text to help identify it in use.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Nginx
Deployment stringId
- End
Date stringTime - The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
- Hint string
- The first three characters of the secret text to help identify it in use.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Nginx
Deployment stringId
- end
Date StringTime - The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
- hint String
- The first three characters of the secret text to help identify it in use.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- nginx
Deployment StringId
- end
Date stringTime - The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
- hint string
- The first three characters of the secret text to help identify it in use.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- nginx
Deployment stringId
- end_
date_ strtime - The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
- hint str
- The first three characters of the secret text to help identify it in use.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- nginx_
deployment_ strid
- end
Date StringTime - The RFC3339 formatted time after which this Dataplane API Key is no longer valid.
- hint String
- The first three characters of the secret text to help identify it in use.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- nginx
Deployment StringId
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.
