/
getDebugToken.go
94 lines (77 loc) · 4.01 KB
/
getDebugToken.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
88
89
90
91
92
93
94
// 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 v1beta
import (
"context"
"reflect"
"github.com/pulumi/pulumi-google-native/sdk/go/google/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets the specified DebugToken. For security reasons, the `token` field is never populated in the response.
func LookupDebugToken(ctx *pulumi.Context, args *LookupDebugTokenArgs, opts ...pulumi.InvokeOption) (*LookupDebugTokenResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv LookupDebugTokenResult
err := ctx.Invoke("google-native:firebaseappcheck/v1beta:getDebugToken", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupDebugTokenArgs struct {
AppId string `pulumi:"appId"`
DebugTokenId string `pulumi:"debugTokenId"`
Project *string `pulumi:"project"`
}
type LookupDebugTokenResult struct {
// A human readable display name used to identify this debug token.
DisplayName string `pulumi:"displayName"`
// The relative resource name of the debug token, in the format: ```projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}```
Name string `pulumi:"name"`
// Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during an UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response.
Token string `pulumi:"token"`
}
func LookupDebugTokenOutput(ctx *pulumi.Context, args LookupDebugTokenOutputArgs, opts ...pulumi.InvokeOption) LookupDebugTokenResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupDebugTokenResult, error) {
args := v.(LookupDebugTokenArgs)
r, err := LookupDebugToken(ctx, &args, opts...)
var s LookupDebugTokenResult
if r != nil {
s = *r
}
return s, err
}).(LookupDebugTokenResultOutput)
}
type LookupDebugTokenOutputArgs struct {
AppId pulumi.StringInput `pulumi:"appId"`
DebugTokenId pulumi.StringInput `pulumi:"debugTokenId"`
Project pulumi.StringPtrInput `pulumi:"project"`
}
func (LookupDebugTokenOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDebugTokenArgs)(nil)).Elem()
}
type LookupDebugTokenResultOutput struct{ *pulumi.OutputState }
func (LookupDebugTokenResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupDebugTokenResult)(nil)).Elem()
}
func (o LookupDebugTokenResultOutput) ToLookupDebugTokenResultOutput() LookupDebugTokenResultOutput {
return o
}
func (o LookupDebugTokenResultOutput) ToLookupDebugTokenResultOutputWithContext(ctx context.Context) LookupDebugTokenResultOutput {
return o
}
// A human readable display name used to identify this debug token.
func (o LookupDebugTokenResultOutput) DisplayName() pulumi.StringOutput {
return o.ApplyT(func(v LookupDebugTokenResult) string { return v.DisplayName }).(pulumi.StringOutput)
}
// The relative resource name of the debug token, in the format: ```projects/{project_number}/apps/{app_id}/debugTokens/{debug_token_id}```
func (o LookupDebugTokenResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupDebugTokenResult) string { return v.Name }).(pulumi.StringOutput)
}
// Input only. Immutable. The secret token itself. Must be provided during creation, and must be a UUID4, case insensitive. This field is immutable once set, and cannot be provided during an UpdateDebugToken request. You can, however, delete this debug token using DeleteDebugToken to revoke it. For security reasons, this field will never be populated in any response.
func (o LookupDebugTokenResultOutput) Token() pulumi.StringOutput {
return o.ApplyT(func(v LookupDebugTokenResult) string { return v.Token }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupDebugTokenResultOutput{})
}