get Key
Use this data source to get the name and value of a pre-existing API Key, for example to supply credentials for a dependency microservice.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.apigateway.ApigatewayFunctions;
import com.pulumi.aws.apigateway.inputs.GetKeyArgs;
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 myApiKey = ApigatewayFunctions.getKey(GetKeyArgs.builder()
.id("ru3mpjgse6")
.build());
}
}
Content copied to clipboard
Return
A collection of values returned by getKey.
Parameters
argument
A collection of arguments for invoking getKey.
Return
A collection of values returned by getKey.
Parameters
id
ID of the API Key to look up.
tags
Map of tags for the resource.
See also
Return
A collection of values returned by getKey.
Parameters
argument
Builder for com.pulumi.aws.apigateway.kotlin.inputs.GetKeyPlainArgs.