forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getSecret.go
148 lines (126 loc) · 4.9 KB
/
getSecret.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
// 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 devtestlab
import (
"context"
"reflect"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Get secret.
// Azure REST API version: 2018-09-15.
//
// Other available API versions: 2016-05-15.
func LookupSecret(ctx *pulumi.Context, args *LookupSecretArgs, opts ...pulumi.InvokeOption) (*LookupSecretResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupSecretResult
err := ctx.Invoke("azure-native:devtestlab:getSecret", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupSecretArgs struct {
// Specify the $expand query. Example: 'properties($select=value)'
Expand *string `pulumi:"expand"`
// The name of the lab.
LabName string `pulumi:"labName"`
// The name of the secret.
Name string `pulumi:"name"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The name of the user profile.
UserName string `pulumi:"userName"`
}
// A secret.
type LookupSecretResult struct {
// The identifier of the resource.
Id string `pulumi:"id"`
// The location of the resource.
Location *string `pulumi:"location"`
// The name of the resource.
Name string `pulumi:"name"`
// The provisioning status of the resource.
ProvisioningState string `pulumi:"provisioningState"`
// The tags of the resource.
Tags map[string]string `pulumi:"tags"`
// The type of the resource.
Type string `pulumi:"type"`
// The unique immutable identifier of a resource (Guid).
UniqueIdentifier string `pulumi:"uniqueIdentifier"`
// The value of the secret for secret creation.
Value *string `pulumi:"value"`
}
func LookupSecretOutput(ctx *pulumi.Context, args LookupSecretOutputArgs, opts ...pulumi.InvokeOption) LookupSecretResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupSecretResult, error) {
args := v.(LookupSecretArgs)
r, err := LookupSecret(ctx, &args, opts...)
var s LookupSecretResult
if r != nil {
s = *r
}
return s, err
}).(LookupSecretResultOutput)
}
type LookupSecretOutputArgs struct {
// Specify the $expand query. Example: 'properties($select=value)'
Expand pulumi.StringPtrInput `pulumi:"expand"`
// The name of the lab.
LabName pulumi.StringInput `pulumi:"labName"`
// The name of the secret.
Name pulumi.StringInput `pulumi:"name"`
// The name of the resource group.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
// The name of the user profile.
UserName pulumi.StringInput `pulumi:"userName"`
}
func (LookupSecretOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSecretArgs)(nil)).Elem()
}
// A secret.
type LookupSecretResultOutput struct{ *pulumi.OutputState }
func (LookupSecretResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupSecretResult)(nil)).Elem()
}
func (o LookupSecretResultOutput) ToLookupSecretResultOutput() LookupSecretResultOutput {
return o
}
func (o LookupSecretResultOutput) ToLookupSecretResultOutputWithContext(ctx context.Context) LookupSecretResultOutput {
return o
}
// The identifier of the resource.
func (o LookupSecretResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecretResult) string { return v.Id }).(pulumi.StringOutput)
}
// The location of the resource.
func (o LookupSecretResultOutput) Location() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupSecretResult) *string { return v.Location }).(pulumi.StringPtrOutput)
}
// The name of the resource.
func (o LookupSecretResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecretResult) string { return v.Name }).(pulumi.StringOutput)
}
// The provisioning status of the resource.
func (o LookupSecretResultOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecretResult) string { return v.ProvisioningState }).(pulumi.StringOutput)
}
// The tags of the resource.
func (o LookupSecretResultOutput) Tags() pulumi.StringMapOutput {
return o.ApplyT(func(v LookupSecretResult) map[string]string { return v.Tags }).(pulumi.StringMapOutput)
}
// The type of the resource.
func (o LookupSecretResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecretResult) string { return v.Type }).(pulumi.StringOutput)
}
// The unique immutable identifier of a resource (Guid).
func (o LookupSecretResultOutput) UniqueIdentifier() pulumi.StringOutput {
return o.ApplyT(func(v LookupSecretResult) string { return v.UniqueIdentifier }).(pulumi.StringOutput)
}
// The value of the secret for secret creation.
func (o LookupSecretResultOutput) Value() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupSecretResult) *string { return v.Value }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(LookupSecretResultOutput{})
}