// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS GameLift */ export interface GameliftBuildConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#name GameliftBuild#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#operating_system GameliftBuild#operating_system} */ readonly operatingSystem: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#tags GameliftBuild#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#tags_all GameliftBuild#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#version GameliftBuild#version} */ readonly version?: string; /** * storage_location block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#storage_location GameliftBuild#storage_location} */ readonly storageLocation: GameliftBuildStorageLocation; } export interface GameliftBuildStorageLocation { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#bucket GameliftBuild#bucket} */ readonly bucket: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#key GameliftBuild#key} */ readonly key: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html#role_arn GameliftBuild#role_arn} */ readonly roleArn: string; } export function gameliftBuildStorageLocationToTerraform(struct?: GameliftBuildStorageLocationOutputReference | GameliftBuildStorageLocation): any { if (!cdktf.canInspect(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { bucket: cdktf.stringToTerraform(struct!.bucket), key: cdktf.stringToTerraform(struct!.key), role_arn: cdktf.stringToTerraform(struct!.roleArn), } } export class GameliftBuildStorageLocationOutputReference extends cdktf.ComplexObject { private isEmptyObject = false; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param isSingleItem True if this is a block, false if it's a list */ public constructor(terraformResource: cdktf.ITerraformResource, terraformAttribute: string, isSingleItem: boolean) { super(terraformResource, terraformAttribute, isSingleItem); } public get internalValue(): GameliftBuildStorageLocation | undefined { let hasAnyValues = this.isEmptyObject; const internalValueResult: any = {}; if (this._bucket !== undefined) { hasAnyValues = true; internalValueResult.bucket = this._bucket; } if (this._key !== undefined) { hasAnyValues = true; internalValueResult.key = this._key; } if (this._roleArn !== undefined) { hasAnyValues = true; internalValueResult.roleArn = this._roleArn; } return hasAnyValues ? internalValueResult : undefined; } public set internalValue(value: GameliftBuildStorageLocation | undefined) { if (value === undefined) { this.isEmptyObject = false; this._bucket = undefined; this._key = undefined; this._roleArn = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucket = value.bucket; this._key = value.key; this._roleArn = value.roleArn; } } // bucket - computed: false, optional: false, required: true private _bucket?: string; public get bucket() { return this.getStringAttribute('bucket'); } public set bucket(value: string) { this._bucket = value; } // Temporarily expose input value. Use with caution. public get bucketInput() { return this._bucket; } // key - computed: false, optional: false, required: true private _key?: string; public get key() { return this.getStringAttribute('key'); } public set key(value: string) { this._key = value; } // Temporarily expose input value. Use with caution. public get keyInput() { return this._key; } // role_arn - computed: false, optional: false, required: true private _roleArn?: string; public get roleArn() { return this.getStringAttribute('role_arn'); } public set roleArn(value: string) { this._roleArn = value; } // Temporarily expose input value. Use with caution. public get roleArnInput() { return this._roleArn; } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html aws_gamelift_build} */ export class GameliftBuild extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_gamelift_build"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/gamelift_build.html aws_gamelift_build} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options GameliftBuildConfig */ public constructor(scope: Construct, id: string, config: GameliftBuildConfig) { super(scope, id, { terraformResourceType: 'aws_gamelift_build', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._name = config.name; this._operatingSystem = config.operatingSystem; this._tags = config.tags; this._tagsAll = config.tagsAll; this._version = config.version; this._storageLocation.internalValue = config.storageLocation; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // id - computed: true, optional: true, required: false public get id() { return this.getStringAttribute('id'); } // name - computed: false, optional: false, required: true private _name?: string; public get name() { return this.getStringAttribute('name'); } public set name(value: string) { this._name = value; } // Temporarily expose input value. Use with caution. public get nameInput() { return this._name; } // operating_system - computed: false, optional: false, required: true private _operatingSystem?: string; public get operatingSystem() { return this.getStringAttribute('operating_system'); } public set operatingSystem(value: string) { this._operatingSystem = value; } // Temporarily expose input value. Use with caution. public get operatingSystemInput() { return this._operatingSystem; } // tags - computed: false, optional: true, required: false private _tags?: { [key: string]: string } | cdktf.IResolvable; public get tags() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags') as any; } public set tags(value: { [key: string]: string } | cdktf.IResolvable) { this._tags = value; } public resetTags() { this._tags = undefined; } // Temporarily expose input value. Use with caution. public get tagsInput() { return this._tags; } // tags_all - computed: true, optional: true, required: false private _tagsAll?: { [key: string]: string } | cdktf.IResolvable; public get tagsAll() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('tags_all') as any; } public set tagsAll(value: { [key: string]: string } | cdktf.IResolvable) { this._tagsAll = value; } public resetTagsAll() { this._tagsAll = undefined; } // Temporarily expose input value. Use with caution. public get tagsAllInput() { return this._tagsAll; } // version - computed: false, optional: true, required: false private _version?: string; public get version() { return this.getStringAttribute('version'); } public set version(value: string) { this._version = value; } public resetVersion() { this._version = undefined; } // Temporarily expose input value. Use with caution. public get versionInput() { return this._version; } // storage_location - computed: false, optional: false, required: true private _storageLocation = new GameliftBuildStorageLocationOutputReference(this as any, "storage_location", true); public get storageLocation() { return this._storageLocation; } public putStorageLocation(value: GameliftBuildStorageLocation) { this._storageLocation.internalValue = value; } // Temporarily expose input value. Use with caution. public get storageLocationInput() { return this._storageLocation.internalValue; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { name: cdktf.stringToTerraform(this._name), operating_system: cdktf.stringToTerraform(this._operatingSystem), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), version: cdktf.stringToTerraform(this._version), storage_location: gameliftBuildStorageLocationToTerraform(this._storageLocation.internalValue), }; } }