From c4fdd8bb2a84226fcefeb65dee358d555429aa71 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy Date: Thu, 7 Dec 2023 20:28:43 -0500 Subject: [PATCH] chore(gamelift): fix some horrible formatting errors --- .../@aws-cdk/aws-gamelift-alpha/lib/alias.ts | 61 +++--- .../aws-gamelift-alpha/lib/build-fleet.ts | 13 +- .../@aws-cdk/aws-gamelift-alpha/lib/build.ts | 111 ++++++----- .../aws-gamelift-alpha/lib/content.ts | 24 ++- .../aws-gamelift-alpha/lib/fleet-base.ts | 183 +++++++++--------- .../lib/game-server-group.ts | 121 ++++++------ .../lib/game-session-queue.ts | 79 ++++---- .../lib/matchmaking-configuration.ts | 131 +++++++------ .../lib/matchmaking-ruleset-body.ts | 27 ++- .../lib/matchmaking-ruleset.ts | 56 +++--- .../lib/queued-matchmaking-configuration.ts | 16 +- .../@aws-cdk/aws-gamelift-alpha/lib/script.ts | 77 ++++---- .../standalone-matchmaking-configuration.ts | 13 +- 13 files changed, 456 insertions(+), 456 deletions(-) diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/alias.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/alias.ts index cc3640d0fa9f3..ba75175c489e2 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/alias.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/alias.ts @@ -8,12 +8,11 @@ import { CfnAlias } from 'aws-cdk-lib/aws-gamelift'; * Represents a Gamelift Alias for a Gamelift fleet destination. */ export interface IAlias extends cdk.IResource, IGameSessionQueueDestination { - /** - * The Identifier of the alias. - * - * @attribute - */ + * The Identifier of the alias. + * + * @attribute + */ readonly aliasId: string; /** @@ -29,10 +28,10 @@ export interface IAlias extends cdk.IResource, IGameSessionQueueDestination { */ export interface AliasOptions { /** - * Description for the alias - * - * @default No description - */ + * Description for the alias + * + * @default No description + */ readonly description?: string; } @@ -41,21 +40,21 @@ export interface AliasOptions { */ export interface AliasAttributes { /** - * The ARN of the alias - * - * At least one of `aliasArn` and `aliasId` must be provided. - * - * @default derived from `aliasId`. - */ + * The ARN of the alias + * + * At least one of `aliasArn` and `aliasId` must be provided. + * + * @default derived from `aliasId`. + */ readonly aliasArn?: string; /** - * The identifier of the alias - * - * At least one of `aliasId` and `aliasArn` must be provided. - * - * @default derived from `aliasArn`. - */ + * The identifier of the alias + * + * At least one of `aliasId` and `aliasArn` must be provided. + * + * @default derived from `aliasArn`. + */ readonly aliasId?: string; } @@ -64,15 +63,15 @@ export interface AliasAttributes { */ export interface AliasProps { /** - * Name of this alias - */ + * Name of this alias + */ readonly aliasName: string; /** - * A human-readable description of the alias - * - * @default no description - */ + * A human-readable description of the alias + * + * @default no description + */ readonly description?: string; /** @@ -100,13 +99,15 @@ export interface AliasProps { */ export abstract class AliasBase extends cdk.Resource implements IAlias { /** - * The Identifier of the alias. - */ + * The Identifier of the alias. + */ public abstract readonly aliasId: string; + /** * The ARN of the alias */ public abstract readonly aliasArn: string; + /** * The ARN to put into the destination field of a game session queue */ @@ -132,7 +133,6 @@ export abstract class AliasBase extends cdk.Resource implements IAlias { * @resource AWS::GameLift::Alias */ export class Alias extends AliasBase { - /** * Import an existing alias from its identifier. */ @@ -248,4 +248,3 @@ export class Alias extends AliasBase { }; } } - diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/build-fleet.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/build-fleet.ts index 67b0ff03e78b9..ae9e24a32222f 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/build-fleet.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/build-fleet.ts @@ -15,13 +15,12 @@ export interface IBuildFleet extends IFleet {} * Properties for a new Gamelift build fleet */ export interface BuildFleetProps extends FleetProps { - /** - * A build to be deployed on the fleet. - * The build must have been successfully uploaded to Amazon GameLift and be in a `READY` status. - * - * This fleet setting cannot be changed once the fleet is created. - */ + * A build to be deployed on the fleet. + * The build must have been successfully uploaded to Amazon GameLift and be in a `READY` status. + * + * This fleet setting cannot be changed once the fleet is created. + */ readonly content: IBuild; /** @@ -201,4 +200,4 @@ export class BuildFleet extends FleetBase implements IBuildFleet { }; } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/build.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/build.ts index 6bf94f1831b07..51bf6fd2c78de 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/build.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/build.ts @@ -16,7 +16,6 @@ import { CfnBuild } from 'aws-cdk-lib/aws-gamelift'; * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html */ export interface IBuild extends cdk.IResource, iam.IGrantable { - /** * The Identifier of the build. * @@ -37,12 +36,13 @@ export interface IBuild extends cdk.IResource, iam.IGrantable { */ export abstract class BuildBase extends cdk.Resource implements IBuild { /** - * The Identifier of the build. - */ + * The Identifier of the build. + */ public abstract readonly buildId: string; + /** - * The ARN of the build. - */ + * The ARN of the build. + */ public abstract readonly buildArn: string; public abstract readonly grantPrincipal: iam.IPrincipal; @@ -87,21 +87,21 @@ export enum OperatingSystem { */ export interface BuildAttributes { /** - * The ARN of the build - * - * At least one of `buildArn` and `buildId` must be provided. - * - * @default derived from `buildId`. - */ + * The ARN of the build + * + * At least one of `buildArn` and `buildId` must be provided. + * + * @default derived from `buildId`. + */ readonly buildArn?: string; /** - * The identifier of the build - * - * At least one of `buildId` and `buildArn` must be provided. - * - * @default derived from `buildArn`. - */ + * The identifier of the build + * + * At least one of `buildId` and `buildArn` must be provided. + * + * @default derived from `buildArn`. + */ readonly buildId?: string; /** * The IAM role assumed by GameLift to access server build in S3. @@ -115,52 +115,52 @@ export interface BuildAttributes { */ export interface BuildProps { /** - * Name of this build - * - * @default No name - */ + * Name of this build + * + * @default No name + */ readonly buildName?: string; /** - * Version of this build - * - * @default No version - */ + * Version of this build + * + * @default No version + */ readonly buildVersion?: string; /** - * The operating system that the game server binaries are built to run on. - * - * @default No version - */ + * The operating system that the game server binaries are built to run on. + * + * @default No version + */ readonly operatingSystem?: OperatingSystem; /** - * The game build file storage - */ + * The game build file storage + */ readonly content: Content; /** - * The IAM role assumed by GameLift to access server build in S3. - * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions - * to have Read access to a specific key content into a specific S3 bucket. - * Below an example of required permission: - * { - * "Version": "2012-10-17", - * "Statement": [{ - * "Effect": "Allow", - * "Action": [ - * "s3:GetObject", - * "s3:GetObjectVersion" - * ], - * "Resource": "arn:aws:s3:::bucket-name/object-name" - * }] - *} - * - * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc - * - * @default - a role will be created with default permissions. - */ + * The IAM role assumed by GameLift to access server build in S3. + * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions + * to have Read access to a specific key content into a specific S3 bucket. + * Below an example of required permission: + * { + * "Version": "2012-10-17", + * "Statement": [{ + * "Effect": "Allow", + * "Action": [ + * "s3:GetObject", + * "s3:GetObjectVersion" + * ], + * "Resource": "arn:aws:s3:::bucket-name/object-name" + * }] + * } + * + * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc + * + * @default - a role will be created with default permissions. + */ readonly role?: iam.IRole; /** @@ -182,7 +182,6 @@ export interface BuildProps { * @resource AWS::GameLift::Build */ export class Build extends BuildBase { - /** * Create a new Build from s3 content */ @@ -202,15 +201,15 @@ export class Build extends BuildBase { } /** - * Import a build into CDK using its identifier - */ + * Import a build into CDK using its identifier + */ static fromBuildId(scope: Construct, id: string, buildId: string): IBuild { return this.fromBuildAttributes(scope, id, { buildId }); } /** - * Import a build into CDK using its ARN - */ + * Import a build into CDK using its ARN + */ static fromBuildArn(scope: Construct, id: string, buildArn: string): IBuild { return this.fromBuildAttributes(scope, id, { buildArn }); } diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/content.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/content.ts index fb57ea0feb520..c478aed7aa14a 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/content.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/content.ts @@ -10,29 +10,28 @@ import { Construct } from 'constructs'; */ export abstract class Content { /** - * Game content as an S3 object. - * @param bucket The S3 bucket - * @param key The object key - * @param objectVersion Optional S3 ob ject version - */ + * Game content as an S3 object. + * @param bucket The S3 bucket + * @param key The object key + * @param objectVersion Optional S3 ob ject version + */ public static fromBucket(bucket: s3.IBucket, key: string, objectVersion?: string): S3Content { return new S3Content(bucket, key, objectVersion); } /** - * Loads the game content from a local disk path. - * - * @param path Either a directory with the game content bundle or a .zip file - */ + * Loads the game content from a local disk path. + * + * @param path Either a directory with the game content bundle or a .zip file + */ public static fromAsset(path: string, options?: s3_assets.AssetOptions): AssetContent { return new AssetContent(path, options); } /** - * Called when the Build is initialized to allow this object to bind - */ + * Called when the Build is initialized to allow this object to bind + */ public abstract bind(scope: Construct, role: iam.IRole): ContentConfig; - } /** @@ -49,7 +48,6 @@ export interface ContentConfig { * Game content from an S3 archive. */ export class S3Content extends Content { - constructor(private readonly bucket: s3.IBucket, private key: string, private objectVersion?: string) { super(); if (!bucket.bucketName) { diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/fleet-base.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/fleet-base.ts index e1e8fd7dcca94..982467194b43b 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/fleet-base.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/fleet-base.ts @@ -14,40 +14,43 @@ import { CfnFleet } from 'aws-cdk-lib/aws-gamelift'; */ export interface LocationCapacity { /** - * The number of Amazon EC2 instances you want to maintain in the specified fleet location. - * This value must fall between the minimum and maximum size limits. - * - * @default the default value is 0 - */ + * The number of Amazon EC2 instances you want to maintain in the specified fleet location. + * This value must fall between the minimum and maximum size limits. + * + * @default the default value is 0 + */ readonly desiredCapacity?: number; + /** - * The maximum number of instances that are allowed in the specified fleet location. - * - * @default the default value is 1 - */ + * The maximum number of instances that are allowed in the specified fleet location. + * + * @default the default value is 1 + */ readonly maxSize?: number; + /** - * The minimum number of instances that are allowed in the specified fleet location. - * - * @default the default value is 0 - */ + * The minimum number of instances that are allowed in the specified fleet location. + * + * @default the default value is 0 + */ readonly minSize?: number; } /** - * A remote location where a multi-location fleet can deploy EC2 instances for game hosting. - */ + * A remote location where a multi-location fleet can deploy EC2 instances for game hosting. + */ export interface Location { /** - * An AWS Region code - */ + * An AWS Region code + */ readonly region: string; + /** - * Current resource capacity settings in a specified fleet or location. - * The location value might refer to a fleet's remote location or its home Region. - * - * @default no capacity settings on the specified location - */ + * Current resource capacity settings in a specified fleet or location. + * The location value might refer to a fleet's remote location or its home Region. + * + * @default no capacity settings on the specified location + */ readonly capacity?: LocationCapacity; } @@ -56,60 +59,62 @@ export interface Location { */ export interface ServerProcess { /** - * The number of server processes using this configuration that run concurrently on each instance. - * Minimum is `1` - * - * @default 1 - */ + * The number of server processes using this configuration that run concurrently on each instance. + * Minimum is `1` + * + * @default 1 + */ readonly concurrentExecutions?: number; + /** - * The location of a game build executable or the Realtime script file that contains the Init() function. Game builds and Realtime scripts are installed on instances at the root: - * - Windows (custom game builds only): `C:\game`. Example: `C:\game\MyGame\server.exe` - * - Linux: `/local/game`. Examples: `/local/game/MyGame/server.exe` or `/local/game/MyRealtimeScript.js` - */ + * The location of a game build executable or the Realtime script file that contains the Init() function. Game builds and Realtime scripts are installed on instances at the root: + * - Windows (custom game builds only): `C:\game`. Example: `C:\game\MyGame\server.exe` + * - Linux: `/local/game`. Examples: `/local/game/MyGame/server.exe` or `/local/game/MyRealtimeScript.js` + */ readonly launchPath: string; /** - * An optional list of parameters to pass to the server executable or Realtime script on launch. - * - * @default no parameters - */ + * An optional list of parameters to pass to the server executable or Realtime script on launch. + * + * @default no parameters + */ readonly parameters?: string; } /** - * A collection of server process configurations that describe the set of processes to run on each instance in a fleet. - * Server processes run either an executable in a custom game build or a Realtime Servers script. - * GameLift launches the configured processes, manages their life cycle, and replaces them as needed. - * Each instance checks regularly for an updated runtime configuration. + * A collection of server process configurations that describe the set of processes to run on each instance in a fleet. + * Server processes run either an executable in a custom game build or a Realtime Servers script. + * GameLift launches the configured processes, manages their life cycle, and replaces them as needed. + * Each instance checks regularly for an updated runtime configuration. + * + * A GameLift instance is limited to 50 processes running concurrently. + * To calculate the total number of processes in a runtime configuration, add the values of the `ConcurrentExecutions` parameter for each `ServerProcess`. + * + * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html + */ +export interface RuntimeConfiguration { + /** + * The maximum amount of time allowed to launch a new game session and have it report ready to host players. + * During this time, the game session is in status `ACTIVATING`. * - * A GameLift instance is limited to 50 processes running concurrently. - * To calculate the total number of processes in a runtime configuration, add the values of the `ConcurrentExecutions` parameter for each `ServerProcess`. + * If the game session does not become active before the timeout, it is ended and the game session status is changed to `TERMINATED`. * - * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/fleets-multiprocess.html + * @default by default game session activation timeout is 300 seconds */ -export interface RuntimeConfiguration { - /** - * The maximum amount of time allowed to launch a new game session and have it report ready to host players. - * During this time, the game session is in status `ACTIVATING`. - * - * If the game session does not become active before the timeout, it is ended and the game session status is changed to `TERMINATED`. - * - * @default by default game session activation timeout is 300 seconds - */ readonly gameSessionActivationTimeout?: cdk.Duration; + /** - * The number of game sessions in status `ACTIVATING` to allow on an instance. - * - * This setting limits the instance resources that can be used for new game activations at any one time. - * - * @default no limit - */ + * The number of game sessions in status `ACTIVATING` to allow on an instance. + * + * This setting limits the instance resources that can be used for new game activations at any one time. + * + * @default no limit + */ readonly maxConcurrentGameSessionActivations?: number; /** - * A collection of server process configurations that identify what server processes to run on each instance in a fleet. - */ + * A collection of server process configurations that identify what server processes to run on each instance in a fleet. + */ readonly serverProcesses: ServerProcess[]; } @@ -124,16 +129,17 @@ export interface RuntimeConfiguration { */ export interface ResourceCreationLimitPolicy { /** - * The maximum number of game sessions that an individual can create during the policy period. - * - * @default no limit on the number of game sessions that an individual can create during the policy period - */ + * The maximum number of game sessions that an individual can create during the policy period. + * + * @default no limit on the number of game sessions that an individual can create during the policy period + */ readonly newGameSessionsPerCreator?: number; + /** - * The time span used in evaluating the resource creation limit policy. - * - * @default no policy period - */ + * The time span used in evaluating the resource creation limit policy. + * + * @default no policy period + */ readonly policyPeriod?: cdk.Duration, } @@ -219,10 +225,9 @@ export interface IFleet extends cdk.IResource, iam.IGrantable, IGameSessionQueue * Properties for a new Gamelift fleet */ export interface FleetProps { - /** - * A descriptive label that is associated with a fleet. Fleet names do not need to be unique. - */ + * A descriptive label that is associated with a fleet. Fleet names do not need to be unique. + */ readonly fleetName: string; /** @@ -260,17 +265,17 @@ export interface FleetProps { readonly useCertificate?: boolean; /** - * The IAM role assumed by GameLift fleet instances to access AWS ressources. - * With a role set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). - * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com). - * No permission is required by default. - * - * This property cannot be changed after the fleet is created. - * - * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html - * - * @default - a role will be created with default trust to Gamelift service principal. - */ + * The IAM role assumed by GameLift fleet instances to access AWS ressources. + * With a role set, any application that runs on an instance in this fleet can assume the role, including install scripts, server processes, and daemons (background processes). + * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com). + * No permission is required by default. + * + * This property cannot be changed after the fleet is created. + * + * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-resources.html + * + * @default - a role will be created with default trust to Gamelift service principal. + */ readonly role?: iam.IRole; /** @@ -373,12 +378,12 @@ export interface FleetProps { */ export interface FleetAttributes { /** - * The ARN of the fleet - * - * At least one of `fleetArn` and `fleetId` must be provided. - * - * @default derived from `fleetId`. - */ + * The ARN of the fleet + * + * At least one of `fleetArn` and `fleetId` must be provided. + * + * @default derived from `fleetId`. + */ readonly fleetArn?: string; /** @@ -402,7 +407,6 @@ export interface FleetAttributes { * Base class for new and imported GameLift fleet. */ export abstract class FleetBase extends cdk.Resource implements IFleet { - /** * Import an existing fleet from its attributes. */ @@ -442,6 +446,7 @@ export abstract class FleetBase extends cdk.Resource implements IFleet { * The Identifier of the fleet. */ public abstract readonly fleetId: string; + /** * The ARN of the fleet. */ @@ -614,8 +619,8 @@ export abstract class FleetBase extends cdk.Resource implements IFleet { minSize: capacity.minSize ?? 0, maxSize: capacity.maxSize ?? 1, }; - } + protected parseRuntimeConfiguration(props: FleetProps): CfnFleet.RuntimeConfigurationProperty | undefined { if (!props.runtimeConfiguration || (!props.runtimeConfiguration.gameSessionActivationTimeout diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/game-server-group.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/game-server-group.ts index 26952d36583f5..71c607fe8b741 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/game-server-group.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/game-server-group.ts @@ -11,11 +11,11 @@ import { CfnGameServerGroup } from 'aws-cdk-lib/aws-gamelift'; */ export interface AutoScalingPolicy { /** - * Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ. - * Specifying a warm-up time can be useful, particularly with game servers that take a long time to start up, because it avoids prematurely starting new instances. - * - * @default no instance warmup duration settled - */ + * Length of time, it takes for a new instance to start new game server processes and register with GameLift FleetIQ. + * Specifying a warm-up time can be useful, particularly with game servers that take a long time to start up, because it avoids prematurely starting new instances. + * + * @default no instance warmup duration settled + */ readonly estimatedInstanceWarmup?: cdk.Duration; /** @@ -35,9 +35,10 @@ export interface AutoScalingPolicy { */ export interface InstanceDefinition { /** - * An Amazon EC2 instance type designation. - */ + * An Amazon EC2 instance type designation. + */ readonly instanceType: ec2.InstanceType; + /** * Instance weighting that indicates how much this instance type contributes to the total capacity of a game server group. * Instance weights are used by GameLift FleetIQ to calculate the instance type's cost per unit hour and better identify the most cost-effective options. @@ -48,47 +49,53 @@ export interface InstanceDefinition { */ readonly weight?: number; } + /** * The type of delete to perform. * To delete a game server group, specify the DeleteOption. */ export enum DeleteOption { /** - * Terminates the game server group and Amazon EC2 Auto Scaling group only when it has no game servers that are in UTILIZED status. - */ + * Terminates the game server group and Amazon EC2 Auto Scaling group only when it has no game servers that are in UTILIZED status. + */ SAFE_DELETE = 'SAFE_DELETE', + /** * Terminates the game server group, including all active game servers regardless of their utilization status, and the Amazon EC2 Auto Scaling group. */ FORCE_DELETE = 'FORCE_DELETE', + /** * Does a safe delete of the game server group but retains the Amazon EC2 Auto Scaling group as is. */ RETAIN = 'RETAIN', } + /** * Indicates how GameLift FleetIQ balances the use of Spot Instances and On-Demand Instances in the game server group. */ export enum BalancingStrategy { /** - * Only Spot Instances are used in the game server group. - * If Spot Instances are unavailable or not viable for game hosting, the game server group provides no hosting capacity until Spot Instances can again be used. - * Until then, no new instances are started, and the existing nonviable Spot Instances are terminated (after current gameplay ends) and are not replaced. - */ + * Only Spot Instances are used in the game server group. + * If Spot Instances are unavailable or not viable for game hosting, the game server group provides no hosting capacity until Spot Instances can again be used. + * Until then, no new instances are started, and the existing nonviable Spot Instances are terminated (after current gameplay ends) and are not replaced. + */ SPOT_ONLY = 'SPOT_ONLY', + /** * Spot Instances are used whenever available in the game server group. * If Spot Instances are unavailable, the game server group continues to provide hosting capacity by falling back to On-Demand Instances. * Existing nonviable Spot Instances are terminated (after current gameplay ends) and are replaced with new On-Demand Instances. */ SPOT_PREFERRED = 'SPOT_PREFERRED', + /** * Only On-Demand Instances are used in the game server group. * No Spot Instances are used, even when available, while this balancing strategy is in force. */ ON_DEMAND_ONLY = 'ON_DEMAND_ONLY', - } + /** * Represent a GameLift FleetIQ game server group. */ @@ -129,10 +136,9 @@ export interface IGameServerGroup extends cdk.IResource, iam.IGrantable { * Base class for new and imported GameLift FleetIQ game server group. */ export abstract class GameServerGroupBase extends cdk.Resource implements IGameServerGroup { - /** - * The ARN of the game server group. - */ + * The ARN of the game server group. + */ public abstract readonly gameServerGroupArn: string; /** @@ -141,13 +147,13 @@ export abstract class GameServerGroupBase extends cdk.Resource implements IGameS public abstract readonly autoScalingGroupArn: string; /** - * The name of the game server group. - */ + * The name of the game server group. + */ public abstract readonly gameServerGroupName: string; /** - * The principal this GameLift game server group is using. - */ + * The principal this GameLift game server group is using. + */ public abstract readonly grantPrincipal: iam.IPrincipal; public grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant { @@ -168,29 +174,28 @@ export abstract class GameServerGroupBase extends cdk.Resource implements IGameS ...props, }).attachTo(this); } - } /** * Represents a GameServerGroup content defined outside of this stack. */ export interface GameServerGroupAttributes { - /** - * The name of the game server group - * - * At least one of `gameServerGroupArn` and `gameServerGroupName` must be provided. - * - * @default derived from `gameServerGroupArn`. - */ + * The name of the game server group + * + * At least one of `gameServerGroupArn` and `gameServerGroupName` must be provided. + * + * @default derived from `gameServerGroupArn`. + */ readonly gameServerGroupName?: string; + /** - * The ARN of the game server group - * - * At least one of `gameServerGroupArn` and `gameServerGroupName` must be provided. - * - * @default derived from `gameServerGroupName`. - */ + * The ARN of the game server group + * + * At least one of `gameServerGroupArn` and `gameServerGroupName` must be provided. + * + * @default derived from `gameServerGroupName`. + */ readonly gameServerGroupArn?: string; /** @@ -213,18 +218,18 @@ export interface GameServerGroupAttributes { */ export interface GameServerGroupProps { /** - * A developer-defined identifier for the game server group. - * The name is unique for each Region in each AWS account. - */ + * A developer-defined identifier for the game server group. + * The name is unique for each Region in each AWS account. + */ readonly gameServerGroupName: string; /** - * The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups. - * - * @see https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-iam-permissions-roles.html - * - * @default - a role will be created with default trust to Gamelift and Autoscaling service principal with a default policy `GameLiftGameServerGroupPolicy` attached. - */ + * The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups. + * + * @see https://docs.aws.amazon.com/gamelift/latest/fleetiqguide/gsg-iam-permissions-roles.html + * + * @default - a role will be created with default trust to Gamelift and Autoscaling service principal with a default policy `GameLiftGameServerGroupPolicy` attached. + */ readonly role?: iam.IRole; /** @@ -240,12 +245,12 @@ export interface GameServerGroupProps { readonly minSize?: number; /** - * The maximum number of instances allowed in the Amazon EC2 Auto Scaling group. During automatic scaling events, GameLift FleetIQ and EC2 do not scale up the group above this maximum. - * - * After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs. - * - * @default the default is 1 - */ + * The maximum number of instances allowed in the Amazon EC2 Auto Scaling group. During automatic scaling events, GameLift FleetIQ and EC2 do not scale up the group above this maximum. + * + * After the Auto Scaling group is created, update this value directly in the Auto Scaling group using the AWS console or APIs. + * + * @default the default is 1 + */ readonly maxSize?: number; /** @@ -343,7 +348,6 @@ export interface GameServerGroupProps { * @resource AWS::GameLift::GameServerGroup */ export class GameServerGroup extends GameServerGroupBase { - /** * Import an existing game server group from its attributes. */ @@ -397,13 +401,13 @@ export class GameServerGroup extends GameServerGroupBase { public readonly autoScalingGroupArn: string; /** - * The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups. - */ + * The IAM role that allows Amazon GameLift to access your Amazon EC2 Auto Scaling groups. + */ public readonly role: iam.IRole; /** - * The principal this GameLift game server group is using. - */ + * The principal this GameLift game server group is using. + */ public readonly grantPrincipal: iam.IPrincipal; /** @@ -412,8 +416,8 @@ export class GameServerGroup extends GameServerGroupBase { public readonly vpc: ec2.IVpc; /** - * The game server group's subnets. - */ + * The game server group's subnets. + */ public readonly vpcSubnets?: ec2.SubnetSelection; constructor(scope: Construct, id: string, props: GameServerGroupProps) { @@ -489,7 +493,6 @@ export class GameServerGroup extends GameServerGroupBase { resourceName: this.physicalName, arnFormat: cdk.ArnFormat.COLON_RESOURCE_NAME, }); - } protected parseLaunchTemplate(props: GameServerGroupProps): CfnGameServerGroup.LaunchTemplateProperty { @@ -523,4 +526,4 @@ export class GameServerGroup extends GameServerGroupBase { }; } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/game-session-queue.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/game-session-queue.ts index 93af69be6d2b8..d5e0cefe9f7c1 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/game-session-queue.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/game-session-queue.ts @@ -22,21 +22,24 @@ export interface IGameSessionQueueDestination { */ export enum PriorityType { /** - * FleetIQ prioritizes locations where the average player latency (provided in each game session request) is lowest. - */ + * FleetIQ prioritizes locations where the average player latency (provided in each game session request) is lowest. + */ LATENCY = 'LATENCY', + /** * FleetIQ prioritizes destinations with the lowest current hosting costs. Cost is evaluated based on the location, instance type, and fleet type (Spot or On-Demand) for each destination in the queue. */ COST = 'COST', + /** * FleetIQ prioritizes based on the order that destinations are listed in the queue configuration. */ DESTINATION = 'DESTINATION', + /** * FleetIQ prioritizes based on the provided order of locations, as defined in `LocationOrder` */ - LOCATION = 'LOCATION' + LOCATION = 'LOCATION', } /** @@ -53,11 +56,12 @@ export enum PriorityType { */ export interface PriorityConfiguration { /** - * The prioritization order to use for fleet locations, when the PriorityOrder property includes LOCATION. Locations are identified by AWS Region codes such as `us-west-2. - * - * Each location can only be listed once. - */ + * The prioritization order to use for fleet locations, when the PriorityOrder property includes LOCATION. Locations are identified by AWS Region codes such as `us-west-2. + * + * Each location can only be listed once. + */ readonly locationOrder: string[]; + /** * The recommended sequence to use when prioritizing where to place new game sessions. * Each type can only be listed once. @@ -73,10 +77,10 @@ export interface PriorityConfiguration { */ export interface PlayerLatencyPolicy { /** - * The maximum latency value that is allowed for any player, in milliseconds. - * - * All policies must have a value set for this property. - */ + * The maximum latency value that is allowed for any player, in milliseconds. + * + * All policies must have a value set for this property. + */ readonly maximumIndividualPlayerLatency: cdk.Duration; /** @@ -91,24 +95,23 @@ export interface PlayerLatencyPolicy { * Represents a Gamelift GameSessionQueue for a Gamelift fleet destination. */ export interface IGameSessionQueue extends cdk.IResource { - /** - * The Name of the gameSessionQueue. - * - * @attribute - */ + * The Name of the gameSessionQueue. + * + * @attribute + */ readonly gameSessionQueueName: string; /** - * The ARN of the gameSessionQueue. - * - * @attribute - */ + * The ARN of the gameSessionQueue. + * + * @attribute + */ readonly gameSessionQueueArn: string; /** - * Return the given named metric for this fleet. - */ + * Return the given named metric for this fleet. + */ metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** @@ -143,8 +146,8 @@ export interface IGameSessionQueue extends cdk.IResource { } /** - * A full specification of an gameSessionQueue that can be used to import it fluently into the CDK application. - */ + * A full specification of an gameSessionQueue that can be used to import it fluently into the CDK application. + */ export interface GameSessionQueueAttributes { /** * The ARN of the gameSessionQueue @@ -166,12 +169,12 @@ export interface GameSessionQueueAttributes { } /** - * Properties for a new Fleet gameSessionQueue - */ + * Properties for a new Fleet gameSessionQueue + */ export interface GameSessionQueueProps { /** - * Name of this gameSessionQueue - */ + * Name of this gameSessionQueue + */ readonly gameSessionQueueName: string; /** @@ -231,10 +234,10 @@ export interface GameSessionQueueProps { readonly timeout?: cdk.Duration; /** - * A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue. - * - * Destinations are listed in order of placement preference. - */ + * A list of fleets and/or fleet alias that can be used to fulfill game session placement requests in the queue. + * + * Destinations are listed in order of placement preference. + */ readonly destinations: IGameSessionQueueDestination[]; } @@ -246,9 +249,10 @@ export abstract class GameSessionQueueBase extends cdk.Resource implements IGame * The name of the gameSessionQueue. */ public abstract readonly gameSessionQueueName: string; + /** - * The ARN of the gameSessionQueue - */ + * The ARN of the gameSessionQueue + */ public abstract readonly gameSessionQueueArn: string; public metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric { @@ -296,7 +300,6 @@ export abstract class GameSessionQueueBase extends cdk.Resource implements IGame * @resource AWS::GameLift::GameSessionQueue */ export class GameSessionQueue extends GameSessionQueueBase { - /** * Import an existing gameSessionQueue from its name. */ @@ -350,8 +353,8 @@ export class GameSessionQueue extends GameSessionQueueBase { public readonly gameSessionQueueName: string; /** - * The ARN of the gameSessionQueue. - */ + * The ARN of the gameSessionQueue. + */ public readonly gameSessionQueueArn: string; private readonly destinations: IGameSessionQueueDestination[] = []; @@ -468,4 +471,4 @@ export class GameSessionQueue extends GameSessionQueueBase { }; } } -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-configuration.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-configuration.ts index bcb2b0425b813..ccd8a051b2ff0 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-configuration.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-configuration.ts @@ -5,21 +5,22 @@ import { Construct } from 'constructs'; import { IMatchmakingRuleSet } from '.'; /** - * A set of custom properties for a game session, formatted as key-value pairs. - * These properties are passed to a game server process with a request to start a new game session. - * - * This parameter is not used for Standalone FlexMatch mode. - * - * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession - */ + * A set of custom properties for a game session, formatted as key-value pairs. + * These properties are passed to a game server process with a request to start a new game session. + * + * This parameter is not used for Standalone FlexMatch mode. + * + * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-sdk-server-api.html#gamelift-sdk-server-startsession + */ export interface GameProperty { /** - * The game property identifier. - */ + * The game property identifier. + */ readonly key: string; + /** - * The game property value. - */ + * The game property value. + */ readonly value: string; } @@ -28,17 +29,17 @@ export interface GameProperty { */ export interface IMatchmakingConfiguration extends cdk.IResource { /** - * The name of the matchmaking configuration. - * - * @attribute - */ + * The name of the matchmaking configuration. + * + * @attribute + */ readonly matchmakingConfigurationName: string; /** - * The ARN of the matchmaking configuration. - * - * @attribute - */ + * The ARN of the matchmaking configuration. + * + * @attribute + */ readonly matchmakingConfigurationArn: string; /** @@ -49,46 +50,46 @@ export interface IMatchmakingConfiguration extends cdk.IResource { readonly notificationTarget?: sns.ITopic; /** - * Return the given named metric for this matchmaking configuration. - */ + * Return the given named metric for this matchmaking configuration. + */ metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** - * Matchmaking requests currently being processed or waiting to be processed. - */ + * Matchmaking requests currently being processed or waiting to be processed. + */ metricCurrentTickets(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** - * For matchmaking configurations that require acceptance, the potential matches that were accepted since the last report. - */ + * For matchmaking configurations that require acceptance, the potential matches that were accepted since the last report. + */ metricMatchesAccepted(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** - * Potential matches that were created since the last report. - */ + * Potential matches that were created since the last report. + */ metricMatchesCreated(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** - * Matches that were successfully placed into a game session since the last report. - */ + * Matches that were successfully placed into a game session since the last report. + */ metricMatchesPlaced(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** - * For matchmaking configurations that require acceptance, the potential matches that were rejected by at least one player since the last report. - */ + * For matchmaking configurations that require acceptance, the potential matches that were rejected by at least one player since the last report. + */ metricMatchesRejected(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** - * Players in matchmaking tickets that were added since the last report. - */ + * Players in matchmaking tickets that were added since the last report. + */ metricPlayersStarted(props?: cloudwatch.MetricOptions): cloudwatch.Metric; /** - * For matchmaking requests that were put into a potential match before the last report, - * the amount of time between ticket creation and potential match creation. - * - * Units: seconds - */ + * For matchmaking requests that were put into a potential match before the last report, + * the amount of time between ticket creation and potential match creation. + * + * Units: seconds + */ metricTimeToMatch(props?: cloudwatch.MetricOptions): cloudwatch.Metric; } @@ -97,21 +98,21 @@ export interface IMatchmakingConfiguration extends cdk.IResource { */ export interface MatchmakingConfigurationAttributes { /** - * The ARN of the Matchmaking configuration - * - * At least one of `matchmakingConfigurationArn` and `matchmakingConfigurationName` must be provided. - * - * @default derived from `matchmakingConfigurationName`. - */ + * The ARN of the Matchmaking configuration + * + * At least one of `matchmakingConfigurationArn` and `matchmakingConfigurationName` must be provided. + * + * @default derived from `matchmakingConfigurationName`. + */ readonly matchmakingConfigurationArn?: string; /** - * The identifier of the Matchmaking configuration - * - * At least one of `matchmakingConfigurationName` and `matchmakingConfigurationArn` must be provided. - * - * @default derived from `matchmakingConfigurationArn`. - */ + * The identifier of the Matchmaking configuration + * + * At least one of `matchmakingConfigurationName` and `matchmakingConfigurationArn` must be provided. + * + * @default derived from `matchmakingConfigurationArn`. + */ readonly matchmakingConfigurationName?: string; /** @@ -128,11 +129,10 @@ export interface MatchmakingConfigurationAttributes { * Properties for a new Gamelift matchmaking configuration */ export interface MatchmakingConfigurationProps { - /** - * A unique identifier for the matchmaking configuration. - * This name is used to identify the configuration associated with a matchmaking request or ticket. - */ + * A unique identifier for the matchmaking configuration. + * This name is used to identify the configuration associated with a matchmaking request or ticket. + */ readonly matchmakingConfigurationName: string; /** @@ -143,11 +143,11 @@ export interface MatchmakingConfigurationProps { readonly description?: string; /** - * A flag that determines whether a match that was created with this configuration must be accepted by the matched players. - * With this option enabled, matchmaking tickets use the status `REQUIRES_ACCEPTANCE` to indicate when a completed potential match is waiting for player acceptance. - * - * @default Acceptance is not required - */ + * A flag that determines whether a match that was created with this configuration must be accepted by the matched players. + * With this option enabled, matchmaking tickets use the status `REQUIRES_ACCEPTANCE` to indicate when a completed potential match is waiting for player acceptance. + * + * @default Acceptance is not required + */ readonly requireAcceptance?: boolean; /** @@ -193,7 +193,6 @@ export interface MatchmakingConfigurationProps { * Base class for new and imported GameLift Matchmaking configuration. */ export abstract class MatchmakingConfigurationBase extends cdk.Resource implements IMatchmakingConfiguration { - /** * Import an existing matchmaking configuration from its attributes. */ @@ -229,12 +228,13 @@ export abstract class MatchmakingConfigurationBase extends cdk.Resource implemen } /** - * The Identifier of the matchmaking configuration. - */ + * The Identifier of the matchmaking configuration. + */ public abstract readonly matchmakingConfigurationName: string; + /** - * The ARN of the matchmaking configuration. - */ + * The ARN of the matchmaking configuration. + */ public abstract readonly matchmakingConfigurationArn: string; /** @@ -280,5 +280,4 @@ export abstract class MatchmakingConfigurationBase extends cdk.Resource implemen metricTimeToMatch(props?: cloudwatch.MetricOptions): cloudwatch.Metric { return this.metric('TimeToMatch', props); } - -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset-body.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset-body.ts index 0587ebde4dd45..6262b4d23e1a9 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset-body.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset-body.ts @@ -11,8 +11,8 @@ export interface IRuleSetBody {} */ export interface RuleSetBodyConfig { /** - * Inline ruleSet body. - */ + * Inline ruleSet body. + */ readonly ruleSetBody: string; } @@ -20,7 +20,6 @@ export interface RuleSetBodyConfig { * Interface to represent a Matchmaking RuleSet content */ export interface IRuleSetContent { - /** * RuleSet body content * @@ -29,11 +28,11 @@ export interface IRuleSetContent { readonly content: IRuleSetBody; /** - * Called when the matchmaking ruleSet is initialized to allow this object to bind - * to the stack and add resources. - * - * @param _scope The binding scope. - */ + * Called when the matchmaking ruleSet is initialized to allow this object to bind + * to the stack and add resources. + * + * @param _scope The binding scope. + */ bind(_scope: Construct): RuleSetBodyConfig; } @@ -41,7 +40,6 @@ export interface IRuleSetContent { * Properties for a new matchmaking ruleSet content */ export interface RuleSetContentProps { - /** * RuleSet body content * @@ -59,7 +57,6 @@ export interface RuleSetContentProps { * - If no match is made after 30 seconds, gradually relax the skill requirements. */ export class RuleSetContent implements IRuleSetContent { - /** * Matchmaking ruleSet body from a file * @returns `RuleSetContentBase` based on JSON file content. @@ -106,11 +103,11 @@ export class RuleSetContent implements IRuleSetContent { } /** - * Called when the matchmaking ruleSet is initialized to allow this object to bind - * to the stack and add resources. - * - * @param _scope The binding scope. - */ + * Called when the matchmaking ruleSet is initialized to allow this object to bind + * to the stack and add resources. + * + * @param _scope The binding scope. + */ public bind(_scope: Construct): RuleSetBodyConfig { return { ruleSetBody: JSON.stringify(this.content), diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset.ts index 0061e314dbded..64323b5e4a7dd 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/matchmaking-ruleset.ts @@ -47,11 +47,11 @@ export interface IMatchmakingRuleSet extends cdk.IResource { */ export interface MatchmakingRuleSetProps { /** - * A unique identifier for the matchmaking rule set. - * A matchmaking configuration identifies the rule set it uses by this name value. - * - * Note: the rule set name is different from the optional name field in the rule set body - */ + * A unique identifier for the matchmaking rule set. + * A matchmaking configuration identifies the rule set it uses by this name value. + * + * Note: the rule set name is different from the optional name field in the rule set body + */ readonly matchmakingRuleSetName: string; /** @@ -65,21 +65,21 @@ export interface MatchmakingRuleSetProps { */ export interface MatchmakingRuleSetAttributes { /** - * The ARN of the matchmaking ruleSet - * - * At least one of `matchmakingRuleSetArn` and `matchmakingRuleSetName` must be provided. - * - * @default derived from `matchmakingRuleSetName`. - */ + * The ARN of the matchmaking ruleSet + * + * At least one of `matchmakingRuleSetArn` and `matchmakingRuleSetName` must be provided. + * + * @default derived from `matchmakingRuleSetName`. + */ readonly matchmakingRuleSetArn?: string; /** - * The unique name of the matchmaking ruleSet - * - * At least one of `ruleSetName` and `matchmakingRuleSetArn` must be provided. - * - * @default derived from `matchmakingRuleSetArn`. - */ + * The unique name of the matchmaking ruleSet + * + * At least one of `ruleSetName` and `matchmakingRuleSetArn` must be provided. + * + * @default derived from `matchmakingRuleSetArn`. + */ readonly matchmakingRuleSetName?: string; } @@ -88,11 +88,11 @@ export interface MatchmakingRuleSetAttributes { * Base class for new and imported GameLift matchmaking ruleSet. */ export abstract class MatchmakingRuleSetBase extends cdk.Resource implements IMatchmakingRuleSet { - /** - * The unique name of the ruleSet. - */ + * The unique name of the ruleSet. + */ public abstract readonly matchmakingRuleSetName: string; + /** * The ARN of the ruleSet. */ @@ -134,17 +134,16 @@ export abstract class MatchmakingRuleSetBase extends cdk.Resource implements IMa * @resource AWS::GameLift::MatchmakingRuleSet */ export class MatchmakingRuleSet extends MatchmakingRuleSetBase { - /** - * Import a ruleSet into CDK using its name - */ + * Import a ruleSet into CDK using its name + */ static fromMatchmakingRuleSetName(scope: Construct, id: string, matchmakingRuleSetName: string): IMatchmakingRuleSet { return this.fromMatchmakingRuleSetAttributes(scope, id, { matchmakingRuleSetName }); } /** - * Import a ruleSet into CDK using its ARN - */ + * Import a ruleSet into CDK using its ARN + */ static fromMatchmakingRuleSetArn(scope: Construct, id: string, matchmakingRuleSetArn: string): IMatchmakingRuleSet { return this.fromMatchmakingRuleSetAttributes(scope, id, { matchmakingRuleSetArn }); } @@ -188,8 +187,8 @@ export class MatchmakingRuleSet extends MatchmakingRuleSetBase { public readonly matchmakingRuleSetName: string; /** - * The ARN of the ruleSet. - */ + * The ARN of the ruleSet. + */ public readonly matchmakingRuleSetArn: string; constructor(scope: Construct, id: string, props: MatchmakingRuleSetProps) { @@ -221,5 +220,4 @@ export class MatchmakingRuleSet extends MatchmakingRuleSetBase { arnFormat: cdk.ArnFormat.SLASH_RESOURCE_NAME, }); } - -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts index 1e32e265dfc50..991aecdff82fc 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/queued-matchmaking-configuration.ts @@ -10,7 +10,7 @@ import { MatchmakingConfigurationProps, GameProperty, MatchmakingConfigurationBa * Properties for a new queued matchmaking configuration */ export interface QueuedMatchmakingConfigurationProps extends MatchmakingConfigurationProps { -/** + /** * The number of player slots in a match to keep open for future players. * For example, if the configuration's rule set specifies a match for a single 12-person team, and the additional player count is set to 2, only 10 players are selected for the match. * @@ -67,7 +67,6 @@ export interface QueuedMatchmakingConfigurationProps extends MatchmakingConfigur * @resource AWS::GameLift::MatchmakingConfiguration */ export class QueuedMatchmakingConfiguration extends MatchmakingConfigurationBase { - /** * Import an existing matchmaking configuration from its name. */ @@ -83,13 +82,15 @@ export class QueuedMatchmakingConfiguration extends MatchmakingConfigurationBase } /** - * The name of the matchmaking configuration. - */ + * The name of the matchmaking configuration. + */ public readonly matchmakingConfigurationName: string; + /** - * The ARN of the matchmaking configuration. - */ + * The ARN of the matchmaking configuration. + */ public readonly matchmakingConfigurationArn: string; + /** * The notification target for matchmaking events */ @@ -216,5 +217,4 @@ export class QueuedMatchmakingConfiguration extends MatchmakingConfigurationBase }; } } - -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/script.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/script.ts index 6f1dba1f267c6..c2ae37cbd1e66 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/script.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/script.ts @@ -7,7 +7,7 @@ import { Content } from './content'; import { CfnScript } from 'aws-cdk-lib/aws-gamelift'; /** - * Your configuration and custom game logic for use with Realtime Servers. + * Your configuration and custom game logic for use with Realtime Servers. * Realtime Servers are provided by GameLift to use instead of a custom-built game server. * You configure Realtime Servers for your game clients by creating a script using JavaScript, * and add custom game logic as appropriate to host game sessions for your players. @@ -16,7 +16,6 @@ import { CfnScript } from 'aws-cdk-lib/aws-gamelift'; * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/realtime-script-uploading.html */ export interface IScript extends cdk.IResource, iam.IGrantable { - /** * The Identifier of the realtime server script. * @@ -37,8 +36,8 @@ export interface IScript extends cdk.IResource, iam.IGrantable { */ export abstract class ScriptBase extends cdk.Resource implements IScript { /** - * The Identifier of the realtime server script. - */ + * The Identifier of the realtime server script. + */ public abstract readonly scriptId: string; public abstract readonly scriptArn: string; @@ -50,9 +49,10 @@ export abstract class ScriptBase extends cdk.Resource implements IScript { */ export interface ScriptAttributes { /** - * The ARN of the realtime server script - */ + * The ARN of the realtime server script + */ readonly scriptArn: string; + /** * The IAM role assumed by GameLift to access server script in S3. * @default - undefined @@ -65,45 +65,45 @@ export interface ScriptAttributes { */ export interface ScriptProps { /** - * Name of this realtime server script - * - * @default No name - */ + * Name of this realtime server script + * + * @default No name + */ readonly scriptName?: string; /** - * Version of this realtime server script - * - * @default No version - */ + * Version of this realtime server script + * + * @default No version + */ readonly scriptVersion?: string; /** - * The game content - */ + * The game content + */ readonly content: Content; /** - * The IAM role assumed by GameLift to access server script in S3. - * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions - * to have Read access to a specific key content into a specific S3 bucket. - * Below an example of required permission: - * { - * "Version": "2012-10-17", - * "Statement": [{ - * "Effect": "Allow", - * "Action": [ - * "s3:GetObject", - * "s3:GetObjectVersion" - * ], - * "Resource": "arn:aws:s3:::bucket-name/object-name" - * }] - *} - * - * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc - * - * @default - a role will be created with default permissions. - */ + * The IAM role assumed by GameLift to access server script in S3. + * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions + * to have Read access to a specific key content into a specific S3 bucket. + * Below an example of required permission: + * { + * "Version": "2012-10-17", + * "Statement": [{ + * "Effect": "Allow", + * "Action": [ + * "s3:GetObject", + * "s3:GetObjectVersion" + * ], + * "Resource": "arn:aws:s3:::bucket-name/object-name" + * }] + * } + * + * @see https://docs.aws.amazon.com/gamelift/latest/developerguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-access-storage-loc + * + * @default - a role will be created with default permissions. + */ readonly role?: iam.IRole; } @@ -116,7 +116,6 @@ export interface ScriptProps { * @resource AWS::GameLift::Script */ export class Script extends ScriptBase { - /** * Create a new realtime server script from s3 content */ @@ -136,8 +135,8 @@ export class Script extends ScriptBase { } /** - * Import a script into CDK using its ARN - */ + * Import a script into CDK using its ARN + */ static fromScriptArn(scope: Construct, id: string, scriptArn: string): IScript { return this.fromScriptAttributes(scope, id, { scriptArn }); } diff --git a/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts b/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts index 68af2935629b5..7f7df76116168 100644 --- a/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts +++ b/packages/@aws-cdk/aws-gamelift-alpha/lib/standalone-matchmaking-configuration.ts @@ -20,17 +20,16 @@ export interface StandaloneMatchmakingConfigurationProps extends MatchmakingConf * @resource AWS::GameLift::MatchmakingConfiguration */ export class StandaloneMatchmakingConfiguration extends MatchmakingConfigurationBase { - /** - * Import an existing matchmaking configuration from its name. - */ + * Import an existing matchmaking configuration from its name. + */ static fromStandaloneMatchmakingConfigurationName(scope: Construct, id: string, matchmakingConfigurationName: string): IMatchmakingConfiguration { return this.fromMatchmakingConfigurationAttributes(scope, id, { matchmakingConfigurationName }); } /** - * Import an existing matchmaking configuration from its ARN. - */ + * Import an existing matchmaking configuration from its ARN. + */ static fromStandaloneMatchmakingConfigurationArn(scope: Construct, id: string, matchmakingConfigurationArn: string): IMatchmakingConfiguration { return this.fromMatchmakingConfigurationAttributes(scope, id, { matchmakingConfigurationArn }); } @@ -39,10 +38,12 @@ export class StandaloneMatchmakingConfiguration extends MatchmakingConfiguration * The Identifier of the matchmaking configuration. */ public readonly matchmakingConfigurationName: string; + /** * The ARN of the matchmaking configuration. */ public readonly matchmakingConfigurationArn: string; + /** * The notification target for matchmaking events */ @@ -116,4 +117,4 @@ export class StandaloneMatchmakingConfiguration extends MatchmakingConfiguration arnFormat: cdk.ArnFormat.SLASH_RESOURCE_NAME, }); } -} \ No newline at end of file +}