github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/devicefarm/project.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 Projects. 15 // 16 // For more information about Device Farm Projects, see the AWS Documentation on 17 // [Device Farm Projects][aws-get-project]. 18 // 19 // > **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. 20 // 21 // ## Example Usage 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/devicefarm" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // _, err := devicefarm.NewProject(ctx, "awesome_devices", &devicefarm.ProjectArgs{ 37 // Name: pulumi.String("my-device-farm"), 38 // }) 39 // if err != nil { 40 // return err 41 // } 42 // return nil 43 // }) 44 // } 45 // 46 // ``` 47 // <!--End PulumiCodeChooser --> 48 // 49 // ## Import 50 // 51 // Using `pulumi import`, import DeviceFarm Projects using their ARN. For example: 52 // 53 // ```sh 54 // $ pulumi import aws:devicefarm/project:Project example arn:aws:devicefarm:us-west-2:123456789012:project:4fa784c7-ccb4-4dbf-ba4f-02198320daa1 55 // ``` 56 type Project struct { 57 pulumi.CustomResourceState 58 59 // The Amazon Resource Name of this project 60 Arn pulumi.StringOutput `pulumi:"arn"` 61 // Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run. 62 DefaultJobTimeoutMinutes pulumi.IntPtrOutput `pulumi:"defaultJobTimeoutMinutes"` 63 // The name of the project 64 Name pulumi.StringOutput `pulumi:"name"` 65 // 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. 66 Tags pulumi.StringMapOutput `pulumi:"tags"` 67 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 68 // 69 // Deprecated: Please use `tags` instead. 70 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 71 } 72 73 // NewProject registers a new resource with the given unique name, arguments, and options. 74 func NewProject(ctx *pulumi.Context, 75 name string, args *ProjectArgs, opts ...pulumi.ResourceOption) (*Project, error) { 76 if args == nil { 77 args = &ProjectArgs{} 78 } 79 80 opts = internal.PkgResourceDefaultOpts(opts) 81 var resource Project 82 err := ctx.RegisterResource("aws:devicefarm/project:Project", name, args, &resource, opts...) 83 if err != nil { 84 return nil, err 85 } 86 return &resource, nil 87 } 88 89 // GetProject gets an existing Project resource's state with the given name, ID, and optional 90 // state properties that are used to uniquely qualify the lookup (nil if not required). 91 func GetProject(ctx *pulumi.Context, 92 name string, id pulumi.IDInput, state *ProjectState, opts ...pulumi.ResourceOption) (*Project, error) { 93 var resource Project 94 err := ctx.ReadResource("aws:devicefarm/project:Project", name, id, state, &resource, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return &resource, nil 99 } 100 101 // Input properties used for looking up and filtering Project resources. 102 type projectState struct { 103 // The Amazon Resource Name of this project 104 Arn *string `pulumi:"arn"` 105 // Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run. 106 DefaultJobTimeoutMinutes *int `pulumi:"defaultJobTimeoutMinutes"` 107 // The name of the project 108 Name *string `pulumi:"name"` 109 // 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. 110 Tags map[string]string `pulumi:"tags"` 111 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 112 // 113 // Deprecated: Please use `tags` instead. 114 TagsAll map[string]string `pulumi:"tagsAll"` 115 } 116 117 type ProjectState struct { 118 // The Amazon Resource Name of this project 119 Arn pulumi.StringPtrInput 120 // Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run. 121 DefaultJobTimeoutMinutes pulumi.IntPtrInput 122 // The name of the project 123 Name pulumi.StringPtrInput 124 // 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. 125 Tags pulumi.StringMapInput 126 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 127 // 128 // Deprecated: Please use `tags` instead. 129 TagsAll pulumi.StringMapInput 130 } 131 132 func (ProjectState) ElementType() reflect.Type { 133 return reflect.TypeOf((*projectState)(nil)).Elem() 134 } 135 136 type projectArgs struct { 137 // Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run. 138 DefaultJobTimeoutMinutes *int `pulumi:"defaultJobTimeoutMinutes"` 139 // The name of the project 140 Name *string `pulumi:"name"` 141 // 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. 142 Tags map[string]string `pulumi:"tags"` 143 } 144 145 // The set of arguments for constructing a Project resource. 146 type ProjectArgs struct { 147 // Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run. 148 DefaultJobTimeoutMinutes pulumi.IntPtrInput 149 // The name of the project 150 Name pulumi.StringPtrInput 151 // 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. 152 Tags pulumi.StringMapInput 153 } 154 155 func (ProjectArgs) ElementType() reflect.Type { 156 return reflect.TypeOf((*projectArgs)(nil)).Elem() 157 } 158 159 type ProjectInput interface { 160 pulumi.Input 161 162 ToProjectOutput() ProjectOutput 163 ToProjectOutputWithContext(ctx context.Context) ProjectOutput 164 } 165 166 func (*Project) ElementType() reflect.Type { 167 return reflect.TypeOf((**Project)(nil)).Elem() 168 } 169 170 func (i *Project) ToProjectOutput() ProjectOutput { 171 return i.ToProjectOutputWithContext(context.Background()) 172 } 173 174 func (i *Project) ToProjectOutputWithContext(ctx context.Context) ProjectOutput { 175 return pulumi.ToOutputWithContext(ctx, i).(ProjectOutput) 176 } 177 178 // ProjectArrayInput is an input type that accepts ProjectArray and ProjectArrayOutput values. 179 // You can construct a concrete instance of `ProjectArrayInput` via: 180 // 181 // ProjectArray{ ProjectArgs{...} } 182 type ProjectArrayInput interface { 183 pulumi.Input 184 185 ToProjectArrayOutput() ProjectArrayOutput 186 ToProjectArrayOutputWithContext(context.Context) ProjectArrayOutput 187 } 188 189 type ProjectArray []ProjectInput 190 191 func (ProjectArray) ElementType() reflect.Type { 192 return reflect.TypeOf((*[]*Project)(nil)).Elem() 193 } 194 195 func (i ProjectArray) ToProjectArrayOutput() ProjectArrayOutput { 196 return i.ToProjectArrayOutputWithContext(context.Background()) 197 } 198 199 func (i ProjectArray) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput { 200 return pulumi.ToOutputWithContext(ctx, i).(ProjectArrayOutput) 201 } 202 203 // ProjectMapInput is an input type that accepts ProjectMap and ProjectMapOutput values. 204 // You can construct a concrete instance of `ProjectMapInput` via: 205 // 206 // ProjectMap{ "key": ProjectArgs{...} } 207 type ProjectMapInput interface { 208 pulumi.Input 209 210 ToProjectMapOutput() ProjectMapOutput 211 ToProjectMapOutputWithContext(context.Context) ProjectMapOutput 212 } 213 214 type ProjectMap map[string]ProjectInput 215 216 func (ProjectMap) ElementType() reflect.Type { 217 return reflect.TypeOf((*map[string]*Project)(nil)).Elem() 218 } 219 220 func (i ProjectMap) ToProjectMapOutput() ProjectMapOutput { 221 return i.ToProjectMapOutputWithContext(context.Background()) 222 } 223 224 func (i ProjectMap) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput { 225 return pulumi.ToOutputWithContext(ctx, i).(ProjectMapOutput) 226 } 227 228 type ProjectOutput struct{ *pulumi.OutputState } 229 230 func (ProjectOutput) ElementType() reflect.Type { 231 return reflect.TypeOf((**Project)(nil)).Elem() 232 } 233 234 func (o ProjectOutput) ToProjectOutput() ProjectOutput { 235 return o 236 } 237 238 func (o ProjectOutput) ToProjectOutputWithContext(ctx context.Context) ProjectOutput { 239 return o 240 } 241 242 // The Amazon Resource Name of this project 243 func (o ProjectOutput) Arn() pulumi.StringOutput { 244 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 245 } 246 247 // Sets the execution timeout value (in minutes) for a project. All test runs in this project use the specified execution timeout value unless overridden when scheduling a run. 248 func (o ProjectOutput) DefaultJobTimeoutMinutes() pulumi.IntPtrOutput { 249 return o.ApplyT(func(v *Project) pulumi.IntPtrOutput { return v.DefaultJobTimeoutMinutes }).(pulumi.IntPtrOutput) 250 } 251 252 // The name of the project 253 func (o ProjectOutput) Name() pulumi.StringOutput { 254 return o.ApplyT(func(v *Project) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 255 } 256 257 // 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. 258 func (o ProjectOutput) Tags() pulumi.StringMapOutput { 259 return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 260 } 261 262 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 263 // 264 // Deprecated: Please use `tags` instead. 265 func (o ProjectOutput) TagsAll() pulumi.StringMapOutput { 266 return o.ApplyT(func(v *Project) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 267 } 268 269 type ProjectArrayOutput struct{ *pulumi.OutputState } 270 271 func (ProjectArrayOutput) ElementType() reflect.Type { 272 return reflect.TypeOf((*[]*Project)(nil)).Elem() 273 } 274 275 func (o ProjectArrayOutput) ToProjectArrayOutput() ProjectArrayOutput { 276 return o 277 } 278 279 func (o ProjectArrayOutput) ToProjectArrayOutputWithContext(ctx context.Context) ProjectArrayOutput { 280 return o 281 } 282 283 func (o ProjectArrayOutput) Index(i pulumi.IntInput) ProjectOutput { 284 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Project { 285 return vs[0].([]*Project)[vs[1].(int)] 286 }).(ProjectOutput) 287 } 288 289 type ProjectMapOutput struct{ *pulumi.OutputState } 290 291 func (ProjectMapOutput) ElementType() reflect.Type { 292 return reflect.TypeOf((*map[string]*Project)(nil)).Elem() 293 } 294 295 func (o ProjectMapOutput) ToProjectMapOutput() ProjectMapOutput { 296 return o 297 } 298 299 func (o ProjectMapOutput) ToProjectMapOutputWithContext(ctx context.Context) ProjectMapOutput { 300 return o 301 } 302 303 func (o ProjectMapOutput) MapIndex(k pulumi.StringInput) ProjectOutput { 304 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Project { 305 return vs[0].(map[string]*Project)[vs[1].(string)] 306 }).(ProjectOutput) 307 } 308 309 func init() { 310 pulumi.RegisterInputType(reflect.TypeOf((*ProjectInput)(nil)).Elem(), &Project{}) 311 pulumi.RegisterInputType(reflect.TypeOf((*ProjectArrayInput)(nil)).Elem(), ProjectArray{}) 312 pulumi.RegisterInputType(reflect.TypeOf((*ProjectMapInput)(nil)).Elem(), ProjectMap{}) 313 pulumi.RegisterOutputType(ProjectOutput{}) 314 pulumi.RegisterOutputType(ProjectArrayOutput{}) 315 pulumi.RegisterOutputType(ProjectMapOutput{}) 316 }