@@ -16,7 +16,6 @@ import { CfnBuild } from 'aws-cdk-lib/aws-gamelift';
16
16
* @see https://docs.aws.amazon.com/gamelift/latest/developerguide/gamelift-build-cli-uploading.html
17
17
*/
18
18
export interface IBuild extends cdk . IResource , iam . IGrantable {
19
-
20
19
/**
21
20
* The Identifier of the build.
22
21
*
@@ -37,12 +36,13 @@ export interface IBuild extends cdk.IResource, iam.IGrantable {
37
36
*/
38
37
export abstract class BuildBase extends cdk . Resource implements IBuild {
39
38
/**
40
- * The Identifier of the build.
41
- */
39
+ * The Identifier of the build.
40
+ */
42
41
public abstract readonly buildId : string ;
42
+
43
43
/**
44
- * The ARN of the build.
45
- */
44
+ * The ARN of the build.
45
+ */
46
46
public abstract readonly buildArn : string ;
47
47
48
48
public abstract readonly grantPrincipal : iam . IPrincipal ;
@@ -87,21 +87,21 @@ export enum OperatingSystem {
87
87
*/
88
88
export interface BuildAttributes {
89
89
/**
90
- * The ARN of the build
91
- *
92
- * At least one of `buildArn` and `buildId` must be provided.
93
- *
94
- * @default derived from `buildId`.
95
- */
90
+ * The ARN of the build
91
+ *
92
+ * At least one of `buildArn` and `buildId` must be provided.
93
+ *
94
+ * @default derived from `buildId`.
95
+ */
96
96
readonly buildArn ?: string ;
97
97
98
98
/**
99
- * The identifier of the build
100
- *
101
- * At least one of `buildId` and `buildArn` must be provided.
102
- *
103
- * @default derived from `buildArn`.
104
- */
99
+ * The identifier of the build
100
+ *
101
+ * At least one of `buildId` and `buildArn` must be provided.
102
+ *
103
+ * @default derived from `buildArn`.
104
+ */
105
105
readonly buildId ?: string ;
106
106
/**
107
107
* The IAM role assumed by GameLift to access server build in S3.
@@ -115,52 +115,52 @@ export interface BuildAttributes {
115
115
*/
116
116
export interface BuildProps {
117
117
/**
118
- * Name of this build
119
- *
120
- * @default No name
121
- */
118
+ * Name of this build
119
+ *
120
+ * @default No name
121
+ */
122
122
readonly buildName ?: string ;
123
123
124
124
/**
125
- * Version of this build
126
- *
127
- * @default No version
128
- */
125
+ * Version of this build
126
+ *
127
+ * @default No version
128
+ */
129
129
readonly buildVersion ?: string ;
130
130
131
131
/**
132
- * The operating system that the game server binaries are built to run on.
133
- *
134
- * @default No version
135
- */
132
+ * The operating system that the game server binaries are built to run on.
133
+ *
134
+ * @default No version
135
+ */
136
136
readonly operatingSystem ?: OperatingSystem ;
137
137
138
138
/**
139
- * The game build file storage
140
- */
139
+ * The game build file storage
140
+ */
141
141
readonly content : Content ;
142
142
143
143
/**
144
- * The IAM role assumed by GameLift to access server build in S3.
145
- * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions
146
- * to have Read access to a specific key content into a specific S3 bucket.
147
- * Below an example of required permission:
148
- * {
149
- * "Version": "2012-10-17",
150
- * "Statement": [{
151
- * "Effect": "Allow",
152
- * "Action": [
153
- * "s3:GetObject",
154
- * "s3:GetObjectVersion"
155
- * ],
156
- * "Resource": "arn:aws:s3:::bucket-name/object-name"
157
- * }]
158
- * }
159
- *
160
- * @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
161
- *
162
- * @default - a role will be created with default permissions.
163
- */
144
+ * The IAM role assumed by GameLift to access server build in S3.
145
+ * If providing a custom role, it needs to trust the GameLift service principal (gamelift.amazonaws.com) and be granted sufficient permissions
146
+ * to have Read access to a specific key content into a specific S3 bucket.
147
+ * Below an example of required permission:
148
+ * {
149
+ * "Version": "2012-10-17",
150
+ * "Statement": [{
151
+ * "Effect": "Allow",
152
+ * "Action": [
153
+ * "s3:GetObject",
154
+ * "s3:GetObjectVersion"
155
+ * ],
156
+ * "Resource": "arn:aws:s3:::bucket-name/object-name"
157
+ * }]
158
+ * }
159
+ *
160
+ * @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
161
+ *
162
+ * @default - a role will be created with default permissions.
163
+ */
164
164
readonly role ?: iam . IRole ;
165
165
166
166
/**
@@ -182,7 +182,6 @@ export interface BuildProps {
182
182
* @resource AWS::GameLift::Build
183
183
*/
184
184
export class Build extends BuildBase {
185
-
186
185
/**
187
186
* Create a new Build from s3 content
188
187
*/
@@ -202,15 +201,15 @@ export class Build extends BuildBase {
202
201
}
203
202
204
203
/**
205
- * Import a build into CDK using its identifier
206
- */
204
+ * Import a build into CDK using its identifier
205
+ */
207
206
static fromBuildId ( scope : Construct , id : string , buildId : string ) : IBuild {
208
207
return this . fromBuildAttributes ( scope , id , { buildId } ) ;
209
208
}
210
209
211
210
/**
212
- * Import a build into CDK using its ARN
213
- */
211
+ * Import a build into CDK using its ARN
212
+ */
214
213
static fromBuildArn ( scope : Construct , id : string , buildArn : string ) : IBuild {
215
214
return this . fromBuildAttributes ( scope , id , { buildArn } ) ;
216
215
}
0 commit comments