github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/devicefarm/instanceProfile.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package devicefarm 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides a resource to manage AWS Device Farm Instance Profiles. 15 // ∂ 16 // > **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. 17 // 18 // ## Example Usage 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/devicefarm" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := devicefarm.NewInstanceProfile(ctx, "example", &devicefarm.InstanceProfileArgs{ 34 // Name: pulumi.String("example"), 35 // }) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 // 46 // ## Import 47 // 48 // Using `pulumi import`, import DeviceFarm Instance Profiles using their ARN. For example: 49 // 50 // ```sh 51 // $ pulumi import aws:devicefarm/instanceProfile:InstanceProfile example arn:aws:devicefarm:us-west-2:123456789012:instanceprofile:4fa784c7-ccb4-4dbf-ba4f-02198320daa1 52 // ``` 53 type InstanceProfile struct { 54 pulumi.CustomResourceState 55 56 // The Amazon Resource Name of this instance profile. 57 Arn pulumi.StringOutput `pulumi:"arn"` 58 // The description of the instance profile. 59 Description pulumi.StringPtrOutput `pulumi:"description"` 60 // An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run. 61 ExcludeAppPackagesFromCleanups pulumi.StringArrayOutput `pulumi:"excludeAppPackagesFromCleanups"` 62 // The name for the instance profile. 63 Name pulumi.StringOutput `pulumi:"name"` 64 // When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices. 65 PackageCleanup pulumi.BoolPtrOutput `pulumi:"packageCleanup"` 66 // When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`. 67 RebootAfterUse pulumi.BoolPtrOutput `pulumi:"rebootAfterUse"` 68 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 69 Tags pulumi.StringMapOutput `pulumi:"tags"` 70 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 71 // 72 // Deprecated: Please use `tags` instead. 73 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 74 } 75 76 // NewInstanceProfile registers a new resource with the given unique name, arguments, and options. 77 func NewInstanceProfile(ctx *pulumi.Context, 78 name string, args *InstanceProfileArgs, opts ...pulumi.ResourceOption) (*InstanceProfile, error) { 79 if args == nil { 80 args = &InstanceProfileArgs{} 81 } 82 83 opts = internal.PkgResourceDefaultOpts(opts) 84 var resource InstanceProfile 85 err := ctx.RegisterResource("aws:devicefarm/instanceProfile:InstanceProfile", name, args, &resource, opts...) 86 if err != nil { 87 return nil, err 88 } 89 return &resource, nil 90 } 91 92 // GetInstanceProfile gets an existing InstanceProfile resource's state with the given name, ID, and optional 93 // state properties that are used to uniquely qualify the lookup (nil if not required). 94 func GetInstanceProfile(ctx *pulumi.Context, 95 name string, id pulumi.IDInput, state *InstanceProfileState, opts ...pulumi.ResourceOption) (*InstanceProfile, error) { 96 var resource InstanceProfile 97 err := ctx.ReadResource("aws:devicefarm/instanceProfile:InstanceProfile", name, id, state, &resource, opts...) 98 if err != nil { 99 return nil, err 100 } 101 return &resource, nil 102 } 103 104 // Input properties used for looking up and filtering InstanceProfile resources. 105 type instanceProfileState struct { 106 // The Amazon Resource Name of this instance profile. 107 Arn *string `pulumi:"arn"` 108 // The description of the instance profile. 109 Description *string `pulumi:"description"` 110 // An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run. 111 ExcludeAppPackagesFromCleanups []string `pulumi:"excludeAppPackagesFromCleanups"` 112 // The name for the instance profile. 113 Name *string `pulumi:"name"` 114 // When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices. 115 PackageCleanup *bool `pulumi:"packageCleanup"` 116 // When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`. 117 RebootAfterUse *bool `pulumi:"rebootAfterUse"` 118 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 119 Tags map[string]string `pulumi:"tags"` 120 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 121 // 122 // Deprecated: Please use `tags` instead. 123 TagsAll map[string]string `pulumi:"tagsAll"` 124 } 125 126 type InstanceProfileState struct { 127 // The Amazon Resource Name of this instance profile. 128 Arn pulumi.StringPtrInput 129 // The description of the instance profile. 130 Description pulumi.StringPtrInput 131 // An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run. 132 ExcludeAppPackagesFromCleanups pulumi.StringArrayInput 133 // The name for the instance profile. 134 Name pulumi.StringPtrInput 135 // When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices. 136 PackageCleanup pulumi.BoolPtrInput 137 // When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`. 138 RebootAfterUse pulumi.BoolPtrInput 139 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 140 Tags pulumi.StringMapInput 141 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 142 // 143 // Deprecated: Please use `tags` instead. 144 TagsAll pulumi.StringMapInput 145 } 146 147 func (InstanceProfileState) ElementType() reflect.Type { 148 return reflect.TypeOf((*instanceProfileState)(nil)).Elem() 149 } 150 151 type instanceProfileArgs struct { 152 // The description of the instance profile. 153 Description *string `pulumi:"description"` 154 // An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run. 155 ExcludeAppPackagesFromCleanups []string `pulumi:"excludeAppPackagesFromCleanups"` 156 // The name for the instance profile. 157 Name *string `pulumi:"name"` 158 // When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices. 159 PackageCleanup *bool `pulumi:"packageCleanup"` 160 // When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`. 161 RebootAfterUse *bool `pulumi:"rebootAfterUse"` 162 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 163 Tags map[string]string `pulumi:"tags"` 164 } 165 166 // The set of arguments for constructing a InstanceProfile resource. 167 type InstanceProfileArgs struct { 168 // The description of the instance profile. 169 Description pulumi.StringPtrInput 170 // An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run. 171 ExcludeAppPackagesFromCleanups pulumi.StringArrayInput 172 // The name for the instance profile. 173 Name pulumi.StringPtrInput 174 // When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices. 175 PackageCleanup pulumi.BoolPtrInput 176 // When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`. 177 RebootAfterUse pulumi.BoolPtrInput 178 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 179 Tags pulumi.StringMapInput 180 } 181 182 func (InstanceProfileArgs) ElementType() reflect.Type { 183 return reflect.TypeOf((*instanceProfileArgs)(nil)).Elem() 184 } 185 186 type InstanceProfileInput interface { 187 pulumi.Input 188 189 ToInstanceProfileOutput() InstanceProfileOutput 190 ToInstanceProfileOutputWithContext(ctx context.Context) InstanceProfileOutput 191 } 192 193 func (*InstanceProfile) ElementType() reflect.Type { 194 return reflect.TypeOf((**InstanceProfile)(nil)).Elem() 195 } 196 197 func (i *InstanceProfile) ToInstanceProfileOutput() InstanceProfileOutput { 198 return i.ToInstanceProfileOutputWithContext(context.Background()) 199 } 200 201 func (i *InstanceProfile) ToInstanceProfileOutputWithContext(ctx context.Context) InstanceProfileOutput { 202 return pulumi.ToOutputWithContext(ctx, i).(InstanceProfileOutput) 203 } 204 205 // InstanceProfileArrayInput is an input type that accepts InstanceProfileArray and InstanceProfileArrayOutput values. 206 // You can construct a concrete instance of `InstanceProfileArrayInput` via: 207 // 208 // InstanceProfileArray{ InstanceProfileArgs{...} } 209 type InstanceProfileArrayInput interface { 210 pulumi.Input 211 212 ToInstanceProfileArrayOutput() InstanceProfileArrayOutput 213 ToInstanceProfileArrayOutputWithContext(context.Context) InstanceProfileArrayOutput 214 } 215 216 type InstanceProfileArray []InstanceProfileInput 217 218 func (InstanceProfileArray) ElementType() reflect.Type { 219 return reflect.TypeOf((*[]*InstanceProfile)(nil)).Elem() 220 } 221 222 func (i InstanceProfileArray) ToInstanceProfileArrayOutput() InstanceProfileArrayOutput { 223 return i.ToInstanceProfileArrayOutputWithContext(context.Background()) 224 } 225 226 func (i InstanceProfileArray) ToInstanceProfileArrayOutputWithContext(ctx context.Context) InstanceProfileArrayOutput { 227 return pulumi.ToOutputWithContext(ctx, i).(InstanceProfileArrayOutput) 228 } 229 230 // InstanceProfileMapInput is an input type that accepts InstanceProfileMap and InstanceProfileMapOutput values. 231 // You can construct a concrete instance of `InstanceProfileMapInput` via: 232 // 233 // InstanceProfileMap{ "key": InstanceProfileArgs{...} } 234 type InstanceProfileMapInput interface { 235 pulumi.Input 236 237 ToInstanceProfileMapOutput() InstanceProfileMapOutput 238 ToInstanceProfileMapOutputWithContext(context.Context) InstanceProfileMapOutput 239 } 240 241 type InstanceProfileMap map[string]InstanceProfileInput 242 243 func (InstanceProfileMap) ElementType() reflect.Type { 244 return reflect.TypeOf((*map[string]*InstanceProfile)(nil)).Elem() 245 } 246 247 func (i InstanceProfileMap) ToInstanceProfileMapOutput() InstanceProfileMapOutput { 248 return i.ToInstanceProfileMapOutputWithContext(context.Background()) 249 } 250 251 func (i InstanceProfileMap) ToInstanceProfileMapOutputWithContext(ctx context.Context) InstanceProfileMapOutput { 252 return pulumi.ToOutputWithContext(ctx, i).(InstanceProfileMapOutput) 253 } 254 255 type InstanceProfileOutput struct{ *pulumi.OutputState } 256 257 func (InstanceProfileOutput) ElementType() reflect.Type { 258 return reflect.TypeOf((**InstanceProfile)(nil)).Elem() 259 } 260 261 func (o InstanceProfileOutput) ToInstanceProfileOutput() InstanceProfileOutput { 262 return o 263 } 264 265 func (o InstanceProfileOutput) ToInstanceProfileOutputWithContext(ctx context.Context) InstanceProfileOutput { 266 return o 267 } 268 269 // The Amazon Resource Name of this instance profile. 270 func (o InstanceProfileOutput) Arn() pulumi.StringOutput { 271 return o.ApplyT(func(v *InstanceProfile) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 272 } 273 274 // The description of the instance profile. 275 func (o InstanceProfileOutput) Description() pulumi.StringPtrOutput { 276 return o.ApplyT(func(v *InstanceProfile) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 277 } 278 279 // An array of strings that specifies the list of app packages that should not be cleaned up from the device after a test run. 280 func (o InstanceProfileOutput) ExcludeAppPackagesFromCleanups() pulumi.StringArrayOutput { 281 return o.ApplyT(func(v *InstanceProfile) pulumi.StringArrayOutput { return v.ExcludeAppPackagesFromCleanups }).(pulumi.StringArrayOutput) 282 } 283 284 // The name for the instance profile. 285 func (o InstanceProfileOutput) Name() pulumi.StringOutput { 286 return o.ApplyT(func(v *InstanceProfile) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 287 } 288 289 // When set to `true`, Device Farm removes app packages after a test run. The default value is `false` for private devices. 290 func (o InstanceProfileOutput) PackageCleanup() pulumi.BoolPtrOutput { 291 return o.ApplyT(func(v *InstanceProfile) pulumi.BoolPtrOutput { return v.PackageCleanup }).(pulumi.BoolPtrOutput) 292 } 293 294 // When set to `true`, Device Farm reboots the instance after a test run. The default value is `true`. 295 func (o InstanceProfileOutput) RebootAfterUse() pulumi.BoolPtrOutput { 296 return o.ApplyT(func(v *InstanceProfile) pulumi.BoolPtrOutput { return v.RebootAfterUse }).(pulumi.BoolPtrOutput) 297 } 298 299 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 300 func (o InstanceProfileOutput) Tags() pulumi.StringMapOutput { 301 return o.ApplyT(func(v *InstanceProfile) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 302 } 303 304 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 305 // 306 // Deprecated: Please use `tags` instead. 307 func (o InstanceProfileOutput) TagsAll() pulumi.StringMapOutput { 308 return o.ApplyT(func(v *InstanceProfile) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 309 } 310 311 type InstanceProfileArrayOutput struct{ *pulumi.OutputState } 312 313 func (InstanceProfileArrayOutput) ElementType() reflect.Type { 314 return reflect.TypeOf((*[]*InstanceProfile)(nil)).Elem() 315 } 316 317 func (o InstanceProfileArrayOutput) ToInstanceProfileArrayOutput() InstanceProfileArrayOutput { 318 return o 319 } 320 321 func (o InstanceProfileArrayOutput) ToInstanceProfileArrayOutputWithContext(ctx context.Context) InstanceProfileArrayOutput { 322 return o 323 } 324 325 func (o InstanceProfileArrayOutput) Index(i pulumi.IntInput) InstanceProfileOutput { 326 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *InstanceProfile { 327 return vs[0].([]*InstanceProfile)[vs[1].(int)] 328 }).(InstanceProfileOutput) 329 } 330 331 type InstanceProfileMapOutput struct{ *pulumi.OutputState } 332 333 func (InstanceProfileMapOutput) ElementType() reflect.Type { 334 return reflect.TypeOf((*map[string]*InstanceProfile)(nil)).Elem() 335 } 336 337 func (o InstanceProfileMapOutput) ToInstanceProfileMapOutput() InstanceProfileMapOutput { 338 return o 339 } 340 341 func (o InstanceProfileMapOutput) ToInstanceProfileMapOutputWithContext(ctx context.Context) InstanceProfileMapOutput { 342 return o 343 } 344 345 func (o InstanceProfileMapOutput) MapIndex(k pulumi.StringInput) InstanceProfileOutput { 346 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *InstanceProfile { 347 return vs[0].(map[string]*InstanceProfile)[vs[1].(string)] 348 }).(InstanceProfileOutput) 349 } 350 351 func init() { 352 pulumi.RegisterInputType(reflect.TypeOf((*InstanceProfileInput)(nil)).Elem(), &InstanceProfile{}) 353 pulumi.RegisterInputType(reflect.TypeOf((*InstanceProfileArrayInput)(nil)).Elem(), InstanceProfileArray{}) 354 pulumi.RegisterInputType(reflect.TypeOf((*InstanceProfileMapInput)(nil)).Elem(), InstanceProfileMap{}) 355 pulumi.RegisterOutputType(InstanceProfileOutput{}) 356 pulumi.RegisterOutputType(InstanceProfileArrayOutput{}) 357 pulumi.RegisterOutputType(InstanceProfileMapOutput{}) 358 }