/
serviceACLEntriesv1.go
300 lines (240 loc) · 11.2 KB
/
serviceACLEntriesv1.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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
// *** 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 fastly
import (
"context"
"reflect"
"github.com/pkg/errors"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
// ## Import
//
// This is an example of the import command being applied to the resource named `fastly_service_acl_entries_v1.entries` The resource ID is a combined value of the `service_id` and `acl_id` separated by a forward slash.
//
// ```sh
// $ pulumi import fastly:index/serviceACLEntriesv1:ServiceACLEntriesv1 entries xxxxxxxxxxxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxx
// ```
//
// If Terraform is already managing remote acl entries against a resource being imported then the user will be asked to remove it from the existing Terraform state.
//
// The following is an example of the Terraform state command to remove the resource named `fastly_service_acl_entries_v1.entries` from the Terraform state file. $ terraform state rm fastly_service_acl_entries_v1.entries
type ServiceACLEntriesv1 struct {
pulumi.CustomResourceState
// The ID of the ACL that the items belong to
AclId pulumi.StringOutput `pulumi:"aclId"`
// A Set ACL entries that are applied to the service. Defined below
Entries ServiceACLEntriesv1EntryArrayOutput `pulumi:"entries"`
// The ID of the Service that the ACL belongs to
ServiceId pulumi.StringOutput `pulumi:"serviceId"`
}
// NewServiceACLEntriesv1 registers a new resource with the given unique name, arguments, and options.
func NewServiceACLEntriesv1(ctx *pulumi.Context,
name string, args *ServiceACLEntriesv1Args, opts ...pulumi.ResourceOption) (*ServiceACLEntriesv1, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.AclId == nil {
return nil, errors.New("invalid value for required argument 'AclId'")
}
if args.ServiceId == nil {
return nil, errors.New("invalid value for required argument 'ServiceId'")
}
var resource ServiceACLEntriesv1
err := ctx.RegisterResource("fastly:index/serviceACLEntriesv1:ServiceACLEntriesv1", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetServiceACLEntriesv1 gets an existing ServiceACLEntriesv1 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 GetServiceACLEntriesv1(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ServiceACLEntriesv1State, opts ...pulumi.ResourceOption) (*ServiceACLEntriesv1, error) {
var resource ServiceACLEntriesv1
err := ctx.ReadResource("fastly:index/serviceACLEntriesv1:ServiceACLEntriesv1", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ServiceACLEntriesv1 resources.
type serviceACLEntriesv1State struct {
// The ID of the ACL that the items belong to
AclId *string `pulumi:"aclId"`
// A Set ACL entries that are applied to the service. Defined below
Entries []ServiceACLEntriesv1Entry `pulumi:"entries"`
// The ID of the Service that the ACL belongs to
ServiceId *string `pulumi:"serviceId"`
}
type ServiceACLEntriesv1State struct {
// The ID of the ACL that the items belong to
AclId pulumi.StringPtrInput
// A Set ACL entries that are applied to the service. Defined below
Entries ServiceACLEntriesv1EntryArrayInput
// The ID of the Service that the ACL belongs to
ServiceId pulumi.StringPtrInput
}
func (ServiceACLEntriesv1State) ElementType() reflect.Type {
return reflect.TypeOf((*serviceACLEntriesv1State)(nil)).Elem()
}
type serviceACLEntriesv1Args struct {
// The ID of the ACL that the items belong to
AclId string `pulumi:"aclId"`
// A Set ACL entries that are applied to the service. Defined below
Entries []ServiceACLEntriesv1Entry `pulumi:"entries"`
// The ID of the Service that the ACL belongs to
ServiceId string `pulumi:"serviceId"`
}
// The set of arguments for constructing a ServiceACLEntriesv1 resource.
type ServiceACLEntriesv1Args struct {
// The ID of the ACL that the items belong to
AclId pulumi.StringInput
// A Set ACL entries that are applied to the service. Defined below
Entries ServiceACLEntriesv1EntryArrayInput
// The ID of the Service that the ACL belongs to
ServiceId pulumi.StringInput
}
func (ServiceACLEntriesv1Args) ElementType() reflect.Type {
return reflect.TypeOf((*serviceACLEntriesv1Args)(nil)).Elem()
}
type ServiceACLEntriesv1Input interface {
pulumi.Input
ToServiceACLEntriesv1Output() ServiceACLEntriesv1Output
ToServiceACLEntriesv1OutputWithContext(ctx context.Context) ServiceACLEntriesv1Output
}
func (*ServiceACLEntriesv1) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceACLEntriesv1)(nil))
}
func (i *ServiceACLEntriesv1) ToServiceACLEntriesv1Output() ServiceACLEntriesv1Output {
return i.ToServiceACLEntriesv1OutputWithContext(context.Background())
}
func (i *ServiceACLEntriesv1) ToServiceACLEntriesv1OutputWithContext(ctx context.Context) ServiceACLEntriesv1Output {
return pulumi.ToOutputWithContext(ctx, i).(ServiceACLEntriesv1Output)
}
func (i *ServiceACLEntriesv1) ToServiceACLEntriesv1PtrOutput() ServiceACLEntriesv1PtrOutput {
return i.ToServiceACLEntriesv1PtrOutputWithContext(context.Background())
}
func (i *ServiceACLEntriesv1) ToServiceACLEntriesv1PtrOutputWithContext(ctx context.Context) ServiceACLEntriesv1PtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceACLEntriesv1PtrOutput)
}
type ServiceACLEntriesv1PtrInput interface {
pulumi.Input
ToServiceACLEntriesv1PtrOutput() ServiceACLEntriesv1PtrOutput
ToServiceACLEntriesv1PtrOutputWithContext(ctx context.Context) ServiceACLEntriesv1PtrOutput
}
type serviceACLEntriesv1PtrType ServiceACLEntriesv1Args
func (*serviceACLEntriesv1PtrType) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceACLEntriesv1)(nil))
}
func (i *serviceACLEntriesv1PtrType) ToServiceACLEntriesv1PtrOutput() ServiceACLEntriesv1PtrOutput {
return i.ToServiceACLEntriesv1PtrOutputWithContext(context.Background())
}
func (i *serviceACLEntriesv1PtrType) ToServiceACLEntriesv1PtrOutputWithContext(ctx context.Context) ServiceACLEntriesv1PtrOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceACLEntriesv1PtrOutput)
}
// ServiceACLEntriesv1ArrayInput is an input type that accepts ServiceACLEntriesv1Array and ServiceACLEntriesv1ArrayOutput values.
// You can construct a concrete instance of `ServiceACLEntriesv1ArrayInput` via:
//
// ServiceACLEntriesv1Array{ ServiceACLEntriesv1Args{...} }
type ServiceACLEntriesv1ArrayInput interface {
pulumi.Input
ToServiceACLEntriesv1ArrayOutput() ServiceACLEntriesv1ArrayOutput
ToServiceACLEntriesv1ArrayOutputWithContext(context.Context) ServiceACLEntriesv1ArrayOutput
}
type ServiceACLEntriesv1Array []ServiceACLEntriesv1Input
func (ServiceACLEntriesv1Array) ElementType() reflect.Type {
return reflect.TypeOf(([]*ServiceACLEntriesv1)(nil))
}
func (i ServiceACLEntriesv1Array) ToServiceACLEntriesv1ArrayOutput() ServiceACLEntriesv1ArrayOutput {
return i.ToServiceACLEntriesv1ArrayOutputWithContext(context.Background())
}
func (i ServiceACLEntriesv1Array) ToServiceACLEntriesv1ArrayOutputWithContext(ctx context.Context) ServiceACLEntriesv1ArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceACLEntriesv1ArrayOutput)
}
// ServiceACLEntriesv1MapInput is an input type that accepts ServiceACLEntriesv1Map and ServiceACLEntriesv1MapOutput values.
// You can construct a concrete instance of `ServiceACLEntriesv1MapInput` via:
//
// ServiceACLEntriesv1Map{ "key": ServiceACLEntriesv1Args{...} }
type ServiceACLEntriesv1MapInput interface {
pulumi.Input
ToServiceACLEntriesv1MapOutput() ServiceACLEntriesv1MapOutput
ToServiceACLEntriesv1MapOutputWithContext(context.Context) ServiceACLEntriesv1MapOutput
}
type ServiceACLEntriesv1Map map[string]ServiceACLEntriesv1Input
func (ServiceACLEntriesv1Map) ElementType() reflect.Type {
return reflect.TypeOf((map[string]*ServiceACLEntriesv1)(nil))
}
func (i ServiceACLEntriesv1Map) ToServiceACLEntriesv1MapOutput() ServiceACLEntriesv1MapOutput {
return i.ToServiceACLEntriesv1MapOutputWithContext(context.Background())
}
func (i ServiceACLEntriesv1Map) ToServiceACLEntriesv1MapOutputWithContext(ctx context.Context) ServiceACLEntriesv1MapOutput {
return pulumi.ToOutputWithContext(ctx, i).(ServiceACLEntriesv1MapOutput)
}
type ServiceACLEntriesv1Output struct {
*pulumi.OutputState
}
func (ServiceACLEntriesv1Output) ElementType() reflect.Type {
return reflect.TypeOf((*ServiceACLEntriesv1)(nil))
}
func (o ServiceACLEntriesv1Output) ToServiceACLEntriesv1Output() ServiceACLEntriesv1Output {
return o
}
func (o ServiceACLEntriesv1Output) ToServiceACLEntriesv1OutputWithContext(ctx context.Context) ServiceACLEntriesv1Output {
return o
}
func (o ServiceACLEntriesv1Output) ToServiceACLEntriesv1PtrOutput() ServiceACLEntriesv1PtrOutput {
return o.ToServiceACLEntriesv1PtrOutputWithContext(context.Background())
}
func (o ServiceACLEntriesv1Output) ToServiceACLEntriesv1PtrOutputWithContext(ctx context.Context) ServiceACLEntriesv1PtrOutput {
return o.ApplyT(func(v ServiceACLEntriesv1) *ServiceACLEntriesv1 {
return &v
}).(ServiceACLEntriesv1PtrOutput)
}
type ServiceACLEntriesv1PtrOutput struct {
*pulumi.OutputState
}
func (ServiceACLEntriesv1PtrOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ServiceACLEntriesv1)(nil))
}
func (o ServiceACLEntriesv1PtrOutput) ToServiceACLEntriesv1PtrOutput() ServiceACLEntriesv1PtrOutput {
return o
}
func (o ServiceACLEntriesv1PtrOutput) ToServiceACLEntriesv1PtrOutputWithContext(ctx context.Context) ServiceACLEntriesv1PtrOutput {
return o
}
type ServiceACLEntriesv1ArrayOutput struct{ *pulumi.OutputState }
func (ServiceACLEntriesv1ArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]ServiceACLEntriesv1)(nil))
}
func (o ServiceACLEntriesv1ArrayOutput) ToServiceACLEntriesv1ArrayOutput() ServiceACLEntriesv1ArrayOutput {
return o
}
func (o ServiceACLEntriesv1ArrayOutput) ToServiceACLEntriesv1ArrayOutputWithContext(ctx context.Context) ServiceACLEntriesv1ArrayOutput {
return o
}
func (o ServiceACLEntriesv1ArrayOutput) Index(i pulumi.IntInput) ServiceACLEntriesv1Output {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) ServiceACLEntriesv1 {
return vs[0].([]ServiceACLEntriesv1)[vs[1].(int)]
}).(ServiceACLEntriesv1Output)
}
type ServiceACLEntriesv1MapOutput struct{ *pulumi.OutputState }
func (ServiceACLEntriesv1MapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]ServiceACLEntriesv1)(nil))
}
func (o ServiceACLEntriesv1MapOutput) ToServiceACLEntriesv1MapOutput() ServiceACLEntriesv1MapOutput {
return o
}
func (o ServiceACLEntriesv1MapOutput) ToServiceACLEntriesv1MapOutputWithContext(ctx context.Context) ServiceACLEntriesv1MapOutput {
return o
}
func (o ServiceACLEntriesv1MapOutput) MapIndex(k pulumi.StringInput) ServiceACLEntriesv1Output {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) ServiceACLEntriesv1 {
return vs[0].(map[string]ServiceACLEntriesv1)[vs[1].(string)]
}).(ServiceACLEntriesv1Output)
}
func init() {
pulumi.RegisterOutputType(ServiceACLEntriesv1Output{})
pulumi.RegisterOutputType(ServiceACLEntriesv1PtrOutput{})
pulumi.RegisterOutputType(ServiceACLEntriesv1ArrayOutput{})
pulumi.RegisterOutputType(ServiceACLEntriesv1MapOutput{})
}