// generated from terraform resource schema import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; /** * AWS GameLift */ export interface GameliftGameSessionQueueConfig extends cdktf.TerraformMetaArguments { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#destinations GameliftGameSessionQueue#destinations} */ readonly destinations?: string[]; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#name GameliftGameSessionQueue#name} */ readonly name: string; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#tags GameliftGameSessionQueue#tags} */ readonly tags?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#tags_all GameliftGameSessionQueue#tags_all} */ readonly tagsAll?: { [key: string]: string } | cdktf.IResolvable; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#timeout_in_seconds GameliftGameSessionQueue#timeout_in_seconds} */ readonly timeoutInSeconds?: number; /** * player_latency_policy block * * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#player_latency_policy GameliftGameSessionQueue#player_latency_policy} */ readonly playerLatencyPolicy?: GameliftGameSessionQueuePlayerLatencyPolicy[]; } export interface GameliftGameSessionQueuePlayerLatencyPolicy { /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#maximum_individual_player_latency_milliseconds GameliftGameSessionQueue#maximum_individual_player_latency_milliseconds} */ readonly maximumIndividualPlayerLatencyMilliseconds: number; /** * Docs at Terraform Registry: {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html#policy_duration_seconds GameliftGameSessionQueue#policy_duration_seconds} */ readonly policyDurationSeconds?: number; } export function gameliftGameSessionQueuePlayerLatencyPolicyToTerraform(struct?: GameliftGameSessionQueuePlayerLatencyPolicy): 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 { maximum_individual_player_latency_milliseconds: cdktf.numberToTerraform(struct!.maximumIndividualPlayerLatencyMilliseconds), policy_duration_seconds: cdktf.numberToTerraform(struct!.policyDurationSeconds), } } /** * Represents a {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html aws_gamelift_game_session_queue} */ export class GameliftGameSessionQueue extends cdktf.TerraformResource { // ================= // STATIC PROPERTIES // ================= public static readonly tfResourceType: string = "aws_gamelift_game_session_queue"; // =========== // INITIALIZER // =========== /** * Create a new {@link https://www.terraform.io/docs/providers/aws/r/gamelift_game_session_queue.html aws_gamelift_game_session_queue} 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 GameliftGameSessionQueueConfig */ public constructor(scope: Construct, id: string, config: GameliftGameSessionQueueConfig) { super(scope, id, { terraformResourceType: 'aws_gamelift_game_session_queue', terraformGeneratorMetadata: { providerName: 'aws' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle }); this._destinations = config.destinations; this._name = config.name; this._tags = config.tags; this._tagsAll = config.tagsAll; this._timeoutInSeconds = config.timeoutInSeconds; this._playerLatencyPolicy = config.playerLatencyPolicy; } // ========== // ATTRIBUTES // ========== // arn - computed: true, optional: false, required: false public get arn() { return this.getStringAttribute('arn'); } // destinations - computed: false, optional: true, required: false private _destinations?: string[]; public get destinations() { return this.getListAttribute('destinations'); } public set destinations(value: string[]) { this._destinations = value; } public resetDestinations() { this._destinations = undefined; } // Temporarily expose input value. Use with caution. public get destinationsInput() { return this._destinations; } // 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; } // 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; } // timeout_in_seconds - computed: false, optional: true, required: false private _timeoutInSeconds?: number; public get timeoutInSeconds() { return this.getNumberAttribute('timeout_in_seconds'); } public set timeoutInSeconds(value: number) { this._timeoutInSeconds = value; } public resetTimeoutInSeconds() { this._timeoutInSeconds = undefined; } // Temporarily expose input value. Use with caution. public get timeoutInSecondsInput() { return this._timeoutInSeconds; } // player_latency_policy - computed: false, optional: true, required: false private _playerLatencyPolicy?: GameliftGameSessionQueuePlayerLatencyPolicy[]; public get playerLatencyPolicy() { // Getting the computed value is not yet implemented return this.interpolationForAttribute('player_latency_policy') as any; } public set playerLatencyPolicy(value: GameliftGameSessionQueuePlayerLatencyPolicy[]) { this._playerLatencyPolicy = value; } public resetPlayerLatencyPolicy() { this._playerLatencyPolicy = undefined; } // Temporarily expose input value. Use with caution. public get playerLatencyPolicyInput() { return this._playerLatencyPolicy; } // ========= // SYNTHESIS // ========= protected synthesizeAttributes(): { [name: string]: any } { return { destinations: cdktf.listMapper(cdktf.stringToTerraform)(this._destinations), name: cdktf.stringToTerraform(this._name), tags: cdktf.hashMapper(cdktf.anyToTerraform)(this._tags), tags_all: cdktf.hashMapper(cdktf.anyToTerraform)(this._tagsAll), timeout_in_seconds: cdktf.numberToTerraform(this._timeoutInSeconds), player_latency_policy: cdktf.listMapper(gameliftGameSessionQueuePlayerLatencyPolicyToTerraform)(this._playerLatencyPolicy), }; } }