/
getKey.go
47 lines (42 loc) · 1.55 KB
/
getKey.go
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
// *** 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! ***
package apigateway
import (
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// 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.
func GetKey(ctx *pulumi.Context, args *GetKeyArgs, opts ...pulumi.InvokeOption) (*GetKeyResult, error) {
var rv GetKeyResult
err := ctx.Invoke("aws:apigateway/getKey:getKey", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getKey.
type GetKeyArgs struct {
// The ID of the API Key to look up.
Id string `pulumi:"id"`
// A mapping of tags for the resource.
Tags map[string]interface{} `pulumi:"tags"`
}
// A collection of values returned by getKey.
type GetKeyResult struct {
// The date and time when the API Key was created.
CreatedDate string `pulumi:"createdDate"`
// The description of the API Key.
Description string `pulumi:"description"`
// Specifies whether the API Key is enabled.
Enabled bool `pulumi:"enabled"`
// Set to the ID of the API Key.
Id string `pulumi:"id"`
// The date and time when the API Key was last updated.
LastUpdatedDate string `pulumi:"lastUpdatedDate"`
// Set to the name of the API Key.
Name string `pulumi:"name"`
// A mapping of tags for the resource.
Tags map[string]interface{} `pulumi:"tags"`
// Set to the value of the API Key.
Value string `pulumi:"value"`
}