/
getKeystore.go
87 lines (71 loc) · 2.81 KB
/
getKeystore.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package v1
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets a keystore or truststore.
func LookupKeystore(ctx *pulumi.Context, args *LookupKeystoreArgs, opts ...pulumi.InvokeOption) (*LookupKeystoreResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupKeystoreResult
err := ctx.Invoke("google-native:apigee/v1:getKeystore", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupKeystoreArgs struct {
EnvironmentId string `pulumi:"environmentId"`
KeystoreId string `pulumi:"keystoreId"`
OrganizationId string `pulumi:"organizationId"`
}
type LookupKeystoreResult struct {
// Aliases in this keystore.
Aliases []string `pulumi:"aliases"`
// Resource ID for this keystore. Values must match the regular expression `[\w[:space:].-]{1,255}`.
Name string `pulumi:"name"`
}
func LookupKeystoreOutput(ctx *pulumi.Context, args LookupKeystoreOutputArgs, opts ...pulumi.InvokeOption) LookupKeystoreResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupKeystoreResult, error) {
args := v.(LookupKeystoreArgs)
r, err := LookupKeystore(ctx, &args, opts...)
var s LookupKeystoreResult
if r != nil {
s = *r
}
return s, err
}).(LookupKeystoreResultOutput)
}
type LookupKeystoreOutputArgs struct {
EnvironmentId pulumi.StringInput `pulumi:"environmentId"`
KeystoreId pulumi.StringInput `pulumi:"keystoreId"`
OrganizationId pulumi.StringInput `pulumi:"organizationId"`
}
func (LookupKeystoreOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupKeystoreArgs)(nil)).Elem()
}
type LookupKeystoreResultOutput struct{ *pulumi.OutputState }
func (LookupKeystoreResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupKeystoreResult)(nil)).Elem()
}
func (o LookupKeystoreResultOutput) ToLookupKeystoreResultOutput() LookupKeystoreResultOutput {
return o
}
func (o LookupKeystoreResultOutput) ToLookupKeystoreResultOutputWithContext(ctx context.Context) LookupKeystoreResultOutput {
return o
}
// Aliases in this keystore.
func (o LookupKeystoreResultOutput) Aliases() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupKeystoreResult) []string { return v.Aliases }).(pulumi.StringArrayOutput)
}
// Resource ID for this keystore. Values must match the regular expression `[\w[:space:].-]{1,255}`.
func (o LookupKeystoreResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupKeystoreResult) string { return v.Name }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupKeystoreResultOutput{})
}