/
getKey.ts
54 lines (50 loc) · 1.32 KB
/
getKey.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
import * as pulumi from "@pulumi/pulumi";
import * as utilities from "../utilities";
/**
* 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
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
*
* const myApiKey = pulumi.output(aws.apigateway.getKey({
* id: "ru3mpjgse6",
* }));
* ```
*/
export function getKey(args: GetKeyArgs, opts?: pulumi.InvokeOptions): Promise<GetKeyResult> {
return pulumi.runtime.invoke("aws:apigateway/getKey:getKey", {
"id": args.id,
}, opts);
}
/**
* A collection of arguments for invoking getKey.
*/
export interface GetKeyArgs {
/**
* The ID of the API Key to look up.
*/
readonly id: string;
}
/**
* A collection of values returned by getKey.
*/
export interface GetKeyResult {
/**
* Set to the ID of the API Key.
*/
readonly id: string;
/**
* Set to the name of the API Key.
*/
readonly name: string;
/**
* Set to the value of the API Key.
*/
readonly value: string;
}