-
Notifications
You must be signed in to change notification settings - Fork 151
/
instanceProfile.go
305 lines (259 loc) · 14 KB
/
instanceProfile.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
301
302
303
304
305
// *** 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 devicefarm
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a resource to manage AWS Device Farm Instance Profiles.
// ∂
// > **NOTE:** AWS currently has limited regional support for Device Farm (e.g., `us-west-2`). See [AWS Device Farm endpoints and quotas](https://docs.aws.amazon.com/general/latest/gr/devicefarm.html) for information on supported regions.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/devicefarm"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := devicefarm.NewInstanceProfile(ctx, "example", nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// DeviceFarm Instance Profiles can be imported by their arn
//
// ```sh
// $ pulumi import aws:devicefarm/instanceProfile:InstanceProfile example arn:aws:devicefarm:us-west-2:123456789012:instanceprofile:4fa784c7-ccb4-4dbf-ba4f-02198320daa1
// ```
type InstanceProfile struct {
pulumi.CustomResourceState
// The Amazon Resource Name of this instance profile.
Arn pulumi.StringOutput `pulumi:"arn"`
// The description of the instance profile.
Description pulumi.StringPtrOutput `pulumi:"description"`
// An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.
ExcludeAppPackagesFromCleanups pulumi.StringArrayOutput `pulumi:"excludeAppPackagesFromCleanups"`
// The name for the instance profile.
Name pulumi.StringOutput `pulumi:"name"`
// When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices.
PackageCleanup pulumi.BoolPtrOutput `pulumi:"packageCleanup"`
// When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`.
RebootAfterUse pulumi.BoolPtrOutput `pulumi:"rebootAfterUse"`
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block).
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}
// NewInstanceProfile registers a new resource with the given unique name, arguments, and options.
func NewInstanceProfile(ctx *pulumi.Context,
name string, args *InstanceProfileArgs, opts ...pulumi.ResourceOption) (*InstanceProfile, error) {
if args == nil {
args = &InstanceProfileArgs{}
}
var resource InstanceProfile
err := ctx.RegisterResource("aws:devicefarm/instanceProfile:InstanceProfile", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetInstanceProfile gets an existing InstanceProfile 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 GetInstanceProfile(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *InstanceProfileState, opts ...pulumi.ResourceOption) (*InstanceProfile, error) {
var resource InstanceProfile
err := ctx.ReadResource("aws:devicefarm/instanceProfile:InstanceProfile", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering InstanceProfile resources.
type instanceProfileState struct {
// The Amazon Resource Name of this instance profile.
Arn *string `pulumi:"arn"`
// The description of the instance profile.
Description *string `pulumi:"description"`
// An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.
ExcludeAppPackagesFromCleanups []string `pulumi:"excludeAppPackagesFromCleanups"`
// The name for the instance profile.
Name *string `pulumi:"name"`
// When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices.
PackageCleanup *bool `pulumi:"packageCleanup"`
// When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`.
RebootAfterUse *bool `pulumi:"rebootAfterUse"`
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block).
TagsAll map[string]string `pulumi:"tagsAll"`
}
type InstanceProfileState struct {
// The Amazon Resource Name of this instance profile.
Arn pulumi.StringPtrInput
// The description of the instance profile.
Description pulumi.StringPtrInput
// An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.
ExcludeAppPackagesFromCleanups pulumi.StringArrayInput
// The name for the instance profile.
Name pulumi.StringPtrInput
// When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices.
PackageCleanup pulumi.BoolPtrInput
// When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`.
RebootAfterUse pulumi.BoolPtrInput
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block).
TagsAll pulumi.StringMapInput
}
func (InstanceProfileState) ElementType() reflect.Type {
return reflect.TypeOf((*instanceProfileState)(nil)).Elem()
}
type instanceProfileArgs struct {
// The description of the instance profile.
Description *string `pulumi:"description"`
// An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.
ExcludeAppPackagesFromCleanups []string `pulumi:"excludeAppPackagesFromCleanups"`
// The name for the instance profile.
Name *string `pulumi:"name"`
// When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices.
PackageCleanup *bool `pulumi:"packageCleanup"`
// When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`.
RebootAfterUse *bool `pulumi:"rebootAfterUse"`
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block).
TagsAll map[string]string `pulumi:"tagsAll"`
}
// The set of arguments for constructing a InstanceProfile resource.
type InstanceProfileArgs struct {
// The description of the instance profile.
Description pulumi.StringPtrInput
// An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run.
ExcludeAppPackagesFromCleanups pulumi.StringArrayInput
// The name for the instance profile.
Name pulumi.StringPtrInput
// When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices.
PackageCleanup pulumi.BoolPtrInput
// When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`.
RebootAfterUse pulumi.BoolPtrInput
// A map of tags to assign to the resource. If configured with a provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block) present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider [`defaultTags` configuration block](https://www.terraform.io/docs/providers/aws/index.html#default_tags-configuration-block).
TagsAll pulumi.StringMapInput
}
func (InstanceProfileArgs) ElementType() reflect.Type {
return reflect.TypeOf((*instanceProfileArgs)(nil)).Elem()
}
type InstanceProfileInput interface {
pulumi.Input
ToInstanceProfileOutput() InstanceProfileOutput
ToInstanceProfileOutputWithContext(ctx context.Context) InstanceProfileOutput
}
func (*InstanceProfile) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceProfile)(nil)).Elem()
}
func (i *InstanceProfile) ToInstanceProfileOutput() InstanceProfileOutput {
return i.ToInstanceProfileOutputWithContext(context.Background())
}
func (i *InstanceProfile) ToInstanceProfileOutputWithContext(ctx context.Context) InstanceProfileOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceProfileOutput)
}
// InstanceProfileArrayInput is an input type that accepts InstanceProfileArray and InstanceProfileArrayOutput values.
// You can construct a concrete instance of `InstanceProfileArrayInput` via:
//
// InstanceProfileArray{ InstanceProfileArgs{...} }
type InstanceProfileArrayInput interface {
pulumi.Input
ToInstanceProfileArrayOutput() InstanceProfileArrayOutput
ToInstanceProfileArrayOutputWithContext(context.Context) InstanceProfileArrayOutput
}
type InstanceProfileArray []InstanceProfileInput
func (InstanceProfileArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InstanceProfile)(nil)).Elem()
}
func (i InstanceProfileArray) ToInstanceProfileArrayOutput() InstanceProfileArrayOutput {
return i.ToInstanceProfileArrayOutputWithContext(context.Background())
}
func (i InstanceProfileArray) ToInstanceProfileArrayOutputWithContext(ctx context.Context) InstanceProfileArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceProfileArrayOutput)
}
// InstanceProfileMapInput is an input type that accepts InstanceProfileMap and InstanceProfileMapOutput values.
// You can construct a concrete instance of `InstanceProfileMapInput` via:
//
// InstanceProfileMap{ "key": InstanceProfileArgs{...} }
type InstanceProfileMapInput interface {
pulumi.Input
ToInstanceProfileMapOutput() InstanceProfileMapOutput
ToInstanceProfileMapOutputWithContext(context.Context) InstanceProfileMapOutput
}
type InstanceProfileMap map[string]InstanceProfileInput
func (InstanceProfileMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InstanceProfile)(nil)).Elem()
}
func (i InstanceProfileMap) ToInstanceProfileMapOutput() InstanceProfileMapOutput {
return i.ToInstanceProfileMapOutputWithContext(context.Background())
}
func (i InstanceProfileMap) ToInstanceProfileMapOutputWithContext(ctx context.Context) InstanceProfileMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(InstanceProfileMapOutput)
}
type InstanceProfileOutput struct{ *pulumi.OutputState }
func (InstanceProfileOutput) ElementType() reflect.Type {
return reflect.TypeOf((**InstanceProfile)(nil)).Elem()
}
func (o InstanceProfileOutput) ToInstanceProfileOutput() InstanceProfileOutput {
return o
}
func (o InstanceProfileOutput) ToInstanceProfileOutputWithContext(ctx context.Context) InstanceProfileOutput {
return o
}
type InstanceProfileArrayOutput struct{ *pulumi.OutputState }
func (InstanceProfileArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*InstanceProfile)(nil)).Elem()
}
func (o InstanceProfileArrayOutput) ToInstanceProfileArrayOutput() InstanceProfileArrayOutput {
return o
}
func (o InstanceProfileArrayOutput) ToInstanceProfileArrayOutputWithContext(ctx context.Context) InstanceProfileArrayOutput {
return o
}
func (o InstanceProfileArrayOutput) Index(i pulumi.IntInput) InstanceProfileOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *InstanceProfile {
return vs[0].([]*InstanceProfile)[vs[1].(int)]
}).(InstanceProfileOutput)
}
type InstanceProfileMapOutput struct{ *pulumi.OutputState }
func (InstanceProfileMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*InstanceProfile)(nil)).Elem()
}
func (o InstanceProfileMapOutput) ToInstanceProfileMapOutput() InstanceProfileMapOutput {
return o
}
func (o InstanceProfileMapOutput) ToInstanceProfileMapOutputWithContext(ctx context.Context) InstanceProfileMapOutput {
return o
}
func (o InstanceProfileMapOutput) MapIndex(k pulumi.StringInput) InstanceProfileOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *InstanceProfile {
return vs[0].(map[string]*InstanceProfile)[vs[1].(string)]
}).(InstanceProfileOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*InstanceProfileInput)(nil)).Elem(), &InstanceProfile{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceProfileArrayInput)(nil)).Elem(), InstanceProfileArray{})
pulumi.RegisterInputType(reflect.TypeOf((*InstanceProfileMapInput)(nil)).Elem(), InstanceProfileMap{})
pulumi.RegisterOutputType(InstanceProfileOutput{})
pulumi.RegisterOutputType(InstanceProfileArrayOutput{})
pulumi.RegisterOutputType(InstanceProfileMapOutput{})
}