github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/gamelift/build.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 gamelift 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an GameLift Build resource. 16 // 17 // ## Example Usage 18 // 19 // <!--Start PulumiCodeChooser --> 20 // ```go 21 // package main 22 // 23 // import ( 24 // 25 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/gamelift" 26 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 27 // 28 // ) 29 // 30 // func main() { 31 // pulumi.Run(func(ctx *pulumi.Context) error { 32 // _, err := gamelift.NewBuild(ctx, "test", &gamelift.BuildArgs{ 33 // Name: pulumi.String("example-build"), 34 // OperatingSystem: pulumi.String("WINDOWS_2012"), 35 // StorageLocation: &gamelift.BuildStorageLocationArgs{ 36 // Bucket: pulumi.Any(testAwsS3Bucket.Id), 37 // Key: pulumi.Any(testAwsS3Object.Key), 38 // RoleArn: pulumi.Any(testAwsIamRole.Arn), 39 // }, 40 // }) 41 // if err != nil { 42 // return err 43 // } 44 // return nil 45 // }) 46 // } 47 // 48 // ``` 49 // <!--End PulumiCodeChooser --> 50 // 51 // ## Import 52 // 53 // Using `pulumi import`, import GameLift Builds using the ID. For example: 54 // 55 // ```sh 56 // $ pulumi import aws:gamelift/build:Build example <build-id> 57 // ``` 58 type Build struct { 59 pulumi.CustomResourceState 60 61 // GameLift Build ARN. 62 Arn pulumi.StringOutput `pulumi:"arn"` 63 // Name of the build 64 Name pulumi.StringOutput `pulumi:"name"` 65 // Operating system that the game server binaries are built to run on. Valid values: `WINDOWS_2012`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `WINDOWS_2016`, `AMAZON_LINUX_2023`. 66 OperatingSystem pulumi.StringOutput `pulumi:"operatingSystem"` 67 // Information indicating where your game build files are stored. See below. 68 StorageLocation BuildStorageLocationOutput `pulumi:"storageLocation"` 69 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 70 Tags pulumi.StringMapOutput `pulumi:"tags"` 71 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 72 // 73 // Deprecated: Please use `tags` instead. 74 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 75 // Version that is associated with this build. 76 Version pulumi.StringPtrOutput `pulumi:"version"` 77 } 78 79 // NewBuild registers a new resource with the given unique name, arguments, and options. 80 func NewBuild(ctx *pulumi.Context, 81 name string, args *BuildArgs, opts ...pulumi.ResourceOption) (*Build, error) { 82 if args == nil { 83 return nil, errors.New("missing one or more required arguments") 84 } 85 86 if args.OperatingSystem == nil { 87 return nil, errors.New("invalid value for required argument 'OperatingSystem'") 88 } 89 if args.StorageLocation == nil { 90 return nil, errors.New("invalid value for required argument 'StorageLocation'") 91 } 92 opts = internal.PkgResourceDefaultOpts(opts) 93 var resource Build 94 err := ctx.RegisterResource("aws:gamelift/build:Build", name, args, &resource, opts...) 95 if err != nil { 96 return nil, err 97 } 98 return &resource, nil 99 } 100 101 // GetBuild gets an existing Build resource's state with the given name, ID, and optional 102 // state properties that are used to uniquely qualify the lookup (nil if not required). 103 func GetBuild(ctx *pulumi.Context, 104 name string, id pulumi.IDInput, state *BuildState, opts ...pulumi.ResourceOption) (*Build, error) { 105 var resource Build 106 err := ctx.ReadResource("aws:gamelift/build:Build", name, id, state, &resource, opts...) 107 if err != nil { 108 return nil, err 109 } 110 return &resource, nil 111 } 112 113 // Input properties used for looking up and filtering Build resources. 114 type buildState struct { 115 // GameLift Build ARN. 116 Arn *string `pulumi:"arn"` 117 // Name of the build 118 Name *string `pulumi:"name"` 119 // Operating system that the game server binaries are built to run on. Valid values: `WINDOWS_2012`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `WINDOWS_2016`, `AMAZON_LINUX_2023`. 120 OperatingSystem *string `pulumi:"operatingSystem"` 121 // Information indicating where your game build files are stored. See below. 122 StorageLocation *BuildStorageLocation `pulumi:"storageLocation"` 123 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 124 Tags map[string]string `pulumi:"tags"` 125 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 126 // 127 // Deprecated: Please use `tags` instead. 128 TagsAll map[string]string `pulumi:"tagsAll"` 129 // Version that is associated with this build. 130 Version *string `pulumi:"version"` 131 } 132 133 type BuildState struct { 134 // GameLift Build ARN. 135 Arn pulumi.StringPtrInput 136 // Name of the build 137 Name pulumi.StringPtrInput 138 // Operating system that the game server binaries are built to run on. Valid values: `WINDOWS_2012`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `WINDOWS_2016`, `AMAZON_LINUX_2023`. 139 OperatingSystem pulumi.StringPtrInput 140 // Information indicating where your game build files are stored. See below. 141 StorageLocation BuildStorageLocationPtrInput 142 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 143 Tags pulumi.StringMapInput 144 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 145 // 146 // Deprecated: Please use `tags` instead. 147 TagsAll pulumi.StringMapInput 148 // Version that is associated with this build. 149 Version pulumi.StringPtrInput 150 } 151 152 func (BuildState) ElementType() reflect.Type { 153 return reflect.TypeOf((*buildState)(nil)).Elem() 154 } 155 156 type buildArgs struct { 157 // Name of the build 158 Name *string `pulumi:"name"` 159 // Operating system that the game server binaries are built to run on. Valid values: `WINDOWS_2012`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `WINDOWS_2016`, `AMAZON_LINUX_2023`. 160 OperatingSystem string `pulumi:"operatingSystem"` 161 // Information indicating where your game build files are stored. See below. 162 StorageLocation BuildStorageLocation `pulumi:"storageLocation"` 163 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 164 Tags map[string]string `pulumi:"tags"` 165 // Version that is associated with this build. 166 Version *string `pulumi:"version"` 167 } 168 169 // The set of arguments for constructing a Build resource. 170 type BuildArgs struct { 171 // Name of the build 172 Name pulumi.StringPtrInput 173 // Operating system that the game server binaries are built to run on. Valid values: `WINDOWS_2012`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `WINDOWS_2016`, `AMAZON_LINUX_2023`. 174 OperatingSystem pulumi.StringInput 175 // Information indicating where your game build files are stored. See below. 176 StorageLocation BuildStorageLocationInput 177 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 178 Tags pulumi.StringMapInput 179 // Version that is associated with this build. 180 Version pulumi.StringPtrInput 181 } 182 183 func (BuildArgs) ElementType() reflect.Type { 184 return reflect.TypeOf((*buildArgs)(nil)).Elem() 185 } 186 187 type BuildInput interface { 188 pulumi.Input 189 190 ToBuildOutput() BuildOutput 191 ToBuildOutputWithContext(ctx context.Context) BuildOutput 192 } 193 194 func (*Build) ElementType() reflect.Type { 195 return reflect.TypeOf((**Build)(nil)).Elem() 196 } 197 198 func (i *Build) ToBuildOutput() BuildOutput { 199 return i.ToBuildOutputWithContext(context.Background()) 200 } 201 202 func (i *Build) ToBuildOutputWithContext(ctx context.Context) BuildOutput { 203 return pulumi.ToOutputWithContext(ctx, i).(BuildOutput) 204 } 205 206 // BuildArrayInput is an input type that accepts BuildArray and BuildArrayOutput values. 207 // You can construct a concrete instance of `BuildArrayInput` via: 208 // 209 // BuildArray{ BuildArgs{...} } 210 type BuildArrayInput interface { 211 pulumi.Input 212 213 ToBuildArrayOutput() BuildArrayOutput 214 ToBuildArrayOutputWithContext(context.Context) BuildArrayOutput 215 } 216 217 type BuildArray []BuildInput 218 219 func (BuildArray) ElementType() reflect.Type { 220 return reflect.TypeOf((*[]*Build)(nil)).Elem() 221 } 222 223 func (i BuildArray) ToBuildArrayOutput() BuildArrayOutput { 224 return i.ToBuildArrayOutputWithContext(context.Background()) 225 } 226 227 func (i BuildArray) ToBuildArrayOutputWithContext(ctx context.Context) BuildArrayOutput { 228 return pulumi.ToOutputWithContext(ctx, i).(BuildArrayOutput) 229 } 230 231 // BuildMapInput is an input type that accepts BuildMap and BuildMapOutput values. 232 // You can construct a concrete instance of `BuildMapInput` via: 233 // 234 // BuildMap{ "key": BuildArgs{...} } 235 type BuildMapInput interface { 236 pulumi.Input 237 238 ToBuildMapOutput() BuildMapOutput 239 ToBuildMapOutputWithContext(context.Context) BuildMapOutput 240 } 241 242 type BuildMap map[string]BuildInput 243 244 func (BuildMap) ElementType() reflect.Type { 245 return reflect.TypeOf((*map[string]*Build)(nil)).Elem() 246 } 247 248 func (i BuildMap) ToBuildMapOutput() BuildMapOutput { 249 return i.ToBuildMapOutputWithContext(context.Background()) 250 } 251 252 func (i BuildMap) ToBuildMapOutputWithContext(ctx context.Context) BuildMapOutput { 253 return pulumi.ToOutputWithContext(ctx, i).(BuildMapOutput) 254 } 255 256 type BuildOutput struct{ *pulumi.OutputState } 257 258 func (BuildOutput) ElementType() reflect.Type { 259 return reflect.TypeOf((**Build)(nil)).Elem() 260 } 261 262 func (o BuildOutput) ToBuildOutput() BuildOutput { 263 return o 264 } 265 266 func (o BuildOutput) ToBuildOutputWithContext(ctx context.Context) BuildOutput { 267 return o 268 } 269 270 // GameLift Build ARN. 271 func (o BuildOutput) Arn() pulumi.StringOutput { 272 return o.ApplyT(func(v *Build) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 273 } 274 275 // Name of the build 276 func (o BuildOutput) Name() pulumi.StringOutput { 277 return o.ApplyT(func(v *Build) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 278 } 279 280 // Operating system that the game server binaries are built to run on. Valid values: `WINDOWS_2012`, `AMAZON_LINUX`, `AMAZON_LINUX_2`, `WINDOWS_2016`, `AMAZON_LINUX_2023`. 281 func (o BuildOutput) OperatingSystem() pulumi.StringOutput { 282 return o.ApplyT(func(v *Build) pulumi.StringOutput { return v.OperatingSystem }).(pulumi.StringOutput) 283 } 284 285 // Information indicating where your game build files are stored. See below. 286 func (o BuildOutput) StorageLocation() BuildStorageLocationOutput { 287 return o.ApplyT(func(v *Build) BuildStorageLocationOutput { return v.StorageLocation }).(BuildStorageLocationOutput) 288 } 289 290 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 291 func (o BuildOutput) Tags() pulumi.StringMapOutput { 292 return o.ApplyT(func(v *Build) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 293 } 294 295 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 296 // 297 // Deprecated: Please use `tags` instead. 298 func (o BuildOutput) TagsAll() pulumi.StringMapOutput { 299 return o.ApplyT(func(v *Build) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 300 } 301 302 // Version that is associated with this build. 303 func (o BuildOutput) Version() pulumi.StringPtrOutput { 304 return o.ApplyT(func(v *Build) pulumi.StringPtrOutput { return v.Version }).(pulumi.StringPtrOutput) 305 } 306 307 type BuildArrayOutput struct{ *pulumi.OutputState } 308 309 func (BuildArrayOutput) ElementType() reflect.Type { 310 return reflect.TypeOf((*[]*Build)(nil)).Elem() 311 } 312 313 func (o BuildArrayOutput) ToBuildArrayOutput() BuildArrayOutput { 314 return o 315 } 316 317 func (o BuildArrayOutput) ToBuildArrayOutputWithContext(ctx context.Context) BuildArrayOutput { 318 return o 319 } 320 321 func (o BuildArrayOutput) Index(i pulumi.IntInput) BuildOutput { 322 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Build { 323 return vs[0].([]*Build)[vs[1].(int)] 324 }).(BuildOutput) 325 } 326 327 type BuildMapOutput struct{ *pulumi.OutputState } 328 329 func (BuildMapOutput) ElementType() reflect.Type { 330 return reflect.TypeOf((*map[string]*Build)(nil)).Elem() 331 } 332 333 func (o BuildMapOutput) ToBuildMapOutput() BuildMapOutput { 334 return o 335 } 336 337 func (o BuildMapOutput) ToBuildMapOutputWithContext(ctx context.Context) BuildMapOutput { 338 return o 339 } 340 341 func (o BuildMapOutput) MapIndex(k pulumi.StringInput) BuildOutput { 342 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Build { 343 return vs[0].(map[string]*Build)[vs[1].(string)] 344 }).(BuildOutput) 345 } 346 347 func init() { 348 pulumi.RegisterInputType(reflect.TypeOf((*BuildInput)(nil)).Elem(), &Build{}) 349 pulumi.RegisterInputType(reflect.TypeOf((*BuildArrayInput)(nil)).Elem(), BuildArray{}) 350 pulumi.RegisterInputType(reflect.TypeOf((*BuildMapInput)(nil)).Elem(), BuildMap{}) 351 pulumi.RegisterOutputType(BuildOutput{}) 352 pulumi.RegisterOutputType(BuildArrayOutput{}) 353 pulumi.RegisterOutputType(BuildMapOutput{}) 354 }