generated from pulumi/pulumi-provider-boilerplate
/
stackTag.go
228 lines (182 loc) · 6.83 KB
/
stackTag.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
// Code generated by pulumigen DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package pulumiservice
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Stacks have associated metadata in the form of tags. Each tag consists of a name and value.
type StackTag struct {
pulumi.CustomResourceState
// Name of the tag. The 'key' part of the key=value pair
Name pulumi.StringPtrOutput `pulumi:"name"`
// Organization name.
Organization pulumi.StringPtrOutput `pulumi:"organization"`
// Project name.
Project pulumi.StringPtrOutput `pulumi:"project"`
// Stack name.
Stack pulumi.StringPtrOutput `pulumi:"stack"`
// Value of the tag. The 'value' part of the key=value pair
Value pulumi.StringPtrOutput `pulumi:"value"`
}
// NewStackTag registers a new resource with the given unique name, arguments, and options.
func NewStackTag(ctx *pulumi.Context,
name string, args *StackTagArgs, opts ...pulumi.ResourceOption) (*StackTag, error) {
if args == nil {
args = &StackTagArgs{}
}
var resource StackTag
err := ctx.RegisterResource("pulumiservice:index:StackTag", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetStackTag gets an existing StackTag resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetStackTag(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *StackTagState, opts ...pulumi.ResourceOption) (*StackTag, error) {
var resource StackTag
err := ctx.ReadResource("pulumiservice:index:StackTag", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering StackTag resources.
type stackTagState struct {
}
type StackTagState struct {
}
func (StackTagState) ElementType() reflect.Type {
return reflect.TypeOf((*stackTagState)(nil)).Elem()
}
type stackTagArgs struct {
// Name of the tag. The 'key' part of the key=value pair
Name *string `pulumi:"name"`
// Organization name.
Organization *string `pulumi:"organization"`
// Project name.
Project *string `pulumi:"project"`
// Stack name.
Stack *string `pulumi:"stack"`
// Value of the tag. The 'value' part of the key=value pair
Value *string `pulumi:"value"`
}
// The set of arguments for constructing a StackTag resource.
type StackTagArgs struct {
// Name of the tag. The 'key' part of the key=value pair
Name pulumi.StringPtrInput
// Organization name.
Organization pulumi.StringPtrInput
// Project name.
Project pulumi.StringPtrInput
// Stack name.
Stack pulumi.StringPtrInput
// Value of the tag. The 'value' part of the key=value pair
Value pulumi.StringPtrInput
}
func (StackTagArgs) ElementType() reflect.Type {
return reflect.TypeOf((*stackTagArgs)(nil)).Elem()
}
type StackTagInput interface {
pulumi.Input
ToStackTagOutput() StackTagOutput
ToStackTagOutputWithContext(ctx context.Context) StackTagOutput
}
func (*StackTag) ElementType() reflect.Type {
return reflect.TypeOf((**StackTag)(nil)).Elem()
}
func (i *StackTag) ToStackTagOutput() StackTagOutput {
return i.ToStackTagOutputWithContext(context.Background())
}
func (i *StackTag) ToStackTagOutputWithContext(ctx context.Context) StackTagOutput {
return pulumi.ToOutputWithContext(ctx, i).(StackTagOutput)
}
// StackTagArrayInput is an input type that accepts StackTagArray and StackTagArrayOutput values.
// You can construct a concrete instance of `StackTagArrayInput` via:
//
// StackTagArray{ StackTagArgs{...} }
type StackTagArrayInput interface {
pulumi.Input
ToStackTagArrayOutput() StackTagArrayOutput
ToStackTagArrayOutputWithContext(context.Context) StackTagArrayOutput
}
type StackTagArray []StackTagInput
func (StackTagArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StackTag)(nil)).Elem()
}
func (i StackTagArray) ToStackTagArrayOutput() StackTagArrayOutput {
return i.ToStackTagArrayOutputWithContext(context.Background())
}
func (i StackTagArray) ToStackTagArrayOutputWithContext(ctx context.Context) StackTagArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(StackTagArrayOutput)
}
// StackTagMapInput is an input type that accepts StackTagMap and StackTagMapOutput values.
// You can construct a concrete instance of `StackTagMapInput` via:
//
// StackTagMap{ "key": StackTagArgs{...} }
type StackTagMapInput interface {
pulumi.Input
ToStackTagMapOutput() StackTagMapOutput
ToStackTagMapOutputWithContext(context.Context) StackTagMapOutput
}
type StackTagMap map[string]StackTagInput
func (StackTagMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StackTag)(nil)).Elem()
}
func (i StackTagMap) ToStackTagMapOutput() StackTagMapOutput {
return i.ToStackTagMapOutputWithContext(context.Background())
}
func (i StackTagMap) ToStackTagMapOutputWithContext(ctx context.Context) StackTagMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(StackTagMapOutput)
}
type StackTagOutput struct{ *pulumi.OutputState }
func (StackTagOutput) ElementType() reflect.Type {
return reflect.TypeOf((**StackTag)(nil)).Elem()
}
func (o StackTagOutput) ToStackTagOutput() StackTagOutput {
return o
}
func (o StackTagOutput) ToStackTagOutputWithContext(ctx context.Context) StackTagOutput {
return o
}
type StackTagArrayOutput struct{ *pulumi.OutputState }
func (StackTagArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*StackTag)(nil)).Elem()
}
func (o StackTagArrayOutput) ToStackTagArrayOutput() StackTagArrayOutput {
return o
}
func (o StackTagArrayOutput) ToStackTagArrayOutputWithContext(ctx context.Context) StackTagArrayOutput {
return o
}
func (o StackTagArrayOutput) Index(i pulumi.IntInput) StackTagOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StackTag {
return vs[0].([]*StackTag)[vs[1].(int)]
}).(StackTagOutput)
}
type StackTagMapOutput struct{ *pulumi.OutputState }
func (StackTagMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*StackTag)(nil)).Elem()
}
func (o StackTagMapOutput) ToStackTagMapOutput() StackTagMapOutput {
return o
}
func (o StackTagMapOutput) ToStackTagMapOutputWithContext(ctx context.Context) StackTagMapOutput {
return o
}
func (o StackTagMapOutput) MapIndex(k pulumi.StringInput) StackTagOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StackTag {
return vs[0].(map[string]*StackTag)[vs[1].(string)]
}).(StackTagOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*StackTagInput)(nil)).Elem(), &StackTag{})
pulumi.RegisterInputType(reflect.TypeOf((*StackTagArrayInput)(nil)).Elem(), StackTagArray{})
pulumi.RegisterInputType(reflect.TypeOf((*StackTagMapInput)(nil)).Elem(), StackTagMap{})
pulumi.RegisterOutputType(StackTagOutput{})
pulumi.RegisterOutputType(StackTagArrayOutput{})
pulumi.RegisterOutputType(StackTagMapOutput{})
}