Skip to content

Commit 3c35c6e

Browse files
author
awstools
committed
feat(client-amplify): Add ComputeRoleArn to CreateApp, UpdateApp, CreateBranch, and UpdateBranch, allowing caller to specify a role to be assumed by Amplify Hosting for server-side rendered applications.
1 parent e7db4d8 commit 3c35c6e

13 files changed

+129
-7
lines changed

clients/client-amplify/src/commands/CreateAppCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export interface CreateAppCommandOutput extends CreateAppResult, __MetadataBeare
4545
* description: "STRING_VALUE",
4646
* repository: "STRING_VALUE",
4747
* platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE",
48+
* computeRoleArn: "STRING_VALUE",
4849
* iamServiceRoleArn: "STRING_VALUE",
4950
* oauthToken: "STRING_VALUE",
5051
* accessToken: "STRING_VALUE",
@@ -105,6 +106,7 @@ export interface CreateAppCommandOutput extends CreateAppResult, __MetadataBeare
105106
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
106107
* // createTime: new Date("TIMESTAMP"), // required
107108
* // updateTime: new Date("TIMESTAMP"), // required
109+
* // computeRoleArn: "STRING_VALUE",
108110
* // iamServiceRoleArn: "STRING_VALUE",
109111
* // environmentVariables: { // EnvironmentVariables // required
110112
* // "<keys>": "STRING_VALUE",

clients/client-amplify/src/commands/CreateBranchCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export interface CreateBranchCommandOutput extends CreateBranchResult, __Metadat
6666
* backend: { // Backend
6767
* stackArn: "STRING_VALUE",
6868
* },
69+
* computeRoleArn: "STRING_VALUE",
6970
* };
7071
* const command = new CreateBranchCommand(input);
7172
* const response = await client.send(command);
@@ -109,6 +110,7 @@ export interface CreateBranchCommandOutput extends CreateBranchResult, __Metadat
109110
* // backend: { // Backend
110111
* // stackArn: "STRING_VALUE",
111112
* // },
113+
* // computeRoleArn: "STRING_VALUE",
112114
* // },
113115
* // };
114116
*

clients/client-amplify/src/commands/DeleteAppCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export interface DeleteAppCommandOutput extends DeleteAppResult, __MetadataBeare
5353
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
5454
* // createTime: new Date("TIMESTAMP"), // required
5555
* // updateTime: new Date("TIMESTAMP"), // required
56+
* // computeRoleArn: "STRING_VALUE",
5657
* // iamServiceRoleArn: "STRING_VALUE",
5758
* // environmentVariables: { // EnvironmentVariables // required
5859
* // "<keys>": "STRING_VALUE",

clients/client-amplify/src/commands/DeleteBranchCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export interface DeleteBranchCommandOutput extends DeleteBranchResult, __Metadat
8181
* // backend: { // Backend
8282
* // stackArn: "STRING_VALUE",
8383
* // },
84+
* // computeRoleArn: "STRING_VALUE",
8485
* // },
8586
* // };
8687
*

clients/client-amplify/src/commands/GetAppCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export interface GetAppCommandOutput extends GetAppResult, __MetadataBearer {}
5353
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
5454
* // createTime: new Date("TIMESTAMP"), // required
5555
* // updateTime: new Date("TIMESTAMP"), // required
56+
* // computeRoleArn: "STRING_VALUE",
5657
* // iamServiceRoleArn: "STRING_VALUE",
5758
* // environmentVariables: { // EnvironmentVariables // required
5859
* // "<keys>": "STRING_VALUE",

clients/client-amplify/src/commands/GetBranchCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export interface GetBranchCommandOutput extends GetBranchResult, __MetadataBeare
8181
* // backend: { // Backend
8282
* // stackArn: "STRING_VALUE",
8383
* // },
84+
* // computeRoleArn: "STRING_VALUE",
8485
* // },
8586
* // };
8687
*

clients/client-amplify/src/commands/ListAppsCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export interface ListAppsCommandOutput extends ListAppsResult, __MetadataBearer
5555
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
5656
* // createTime: new Date("TIMESTAMP"), // required
5757
* // updateTime: new Date("TIMESTAMP"), // required
58+
* // computeRoleArn: "STRING_VALUE",
5859
* // iamServiceRoleArn: "STRING_VALUE",
5960
* // environmentVariables: { // EnvironmentVariables // required
6061
* // "<keys>": "STRING_VALUE",

clients/client-amplify/src/commands/ListBranchesCommand.ts

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export interface ListBranchesCommandOutput extends ListBranchesResult, __Metadat
8383
* // backend: { // Backend
8484
* // stackArn: "STRING_VALUE",
8585
* // },
86+
* // computeRoleArn: "STRING_VALUE",
8687
* // },
8788
* // ],
8889
* // nextToken: "STRING_VALUE",

clients/client-amplify/src/commands/UpdateAppCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export interface UpdateAppCommandOutput extends UpdateAppResult, __MetadataBeare
4545
* name: "STRING_VALUE",
4646
* description: "STRING_VALUE",
4747
* platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE",
48+
* computeRoleArn: "STRING_VALUE",
4849
* iamServiceRoleArn: "STRING_VALUE",
4950
* environmentVariables: { // EnvironmentVariables
5051
* "<keys>": "STRING_VALUE",
@@ -103,6 +104,7 @@ export interface UpdateAppCommandOutput extends UpdateAppResult, __MetadataBeare
103104
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
104105
* // createTime: new Date("TIMESTAMP"), // required
105106
* // updateTime: new Date("TIMESTAMP"), // required
107+
* // computeRoleArn: "STRING_VALUE",
106108
* // iamServiceRoleArn: "STRING_VALUE",
107109
* // environmentVariables: { // EnvironmentVariables // required
108110
* // "<keys>": "STRING_VALUE",

clients/client-amplify/src/commands/UpdateBranchCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface UpdateBranchCommandOutput extends UpdateBranchResult, __Metadat
6363
* backend: { // Backend
6464
* stackArn: "STRING_VALUE",
6565
* },
66+
* computeRoleArn: "STRING_VALUE",
6667
* };
6768
* const command = new UpdateBranchCommand(input);
6869
* const response = await client.send(command);
@@ -106,6 +107,7 @@ export interface UpdateBranchCommandOutput extends UpdateBranchResult, __Metadat
106107
* // backend: { // Backend
107108
* // stackArn: "STRING_VALUE",
108109
* // },
110+
* // computeRoleArn: "STRING_VALUE",
109111
* // },
110112
* // };
111113
*

clients/client-amplify/src/models/models_0.ts

+60-4
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,17 @@ export interface CreateAppRequest {
251251
platform?: Platform | undefined;
252252

253253
/**
254-
* <p>The AWS Identity and Access Management (IAM) service role for an Amplify app. </p>
254+
* <p>The Amazon Resource Name (ARN) of the IAM role to assign to an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources
255+
* based on the role's permissions. For more information about the SSR Compute role, see
256+
* <a href="https://docs.aws.amazon.com/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User
257+
* Guide</i>.</p>
258+
* @public
259+
*/
260+
computeRoleArn?: string | undefined;
261+
262+
/**
263+
* <p>The Amazon Resource Name
264+
* (ARN) of the IAM service role for the Amplify app.</p>
255265
* @public
256266
*/
257267
iamServiceRoleArn?: string | undefined;
@@ -532,8 +542,17 @@ export interface App {
532542
updateTime: Date | undefined;
533543

534544
/**
535-
* <p>The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name
536-
* (ARN) of the Amplify app. </p>
545+
* <p>The Amazon Resource Name (ARN) of the IAM role for an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources
546+
* based on the role's permissions. For more information about the SSR Compute role, see
547+
* <a href="https://docs.aws.amazon.com/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User
548+
* Guide</i>.</p>
549+
* @public
550+
*/
551+
computeRoleArn?: string | undefined;
552+
553+
/**
554+
* <p>The Amazon Resource Name
555+
* (ARN) of the IAM service role for the Amplify app.</p>
537556
* @public
538557
*/
539558
iamServiceRoleArn?: string | undefined;
@@ -1007,6 +1026,15 @@ export interface CreateBranchRequest {
10071026
* @public
10081027
*/
10091028
backend?: Backend | undefined;
1029+
1030+
/**
1031+
* <p>The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources
1032+
* based on the role's permissions. For more information about the SSR Compute role, see
1033+
* <a href="https://docs.aws.amazon.com/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User
1034+
* Guide</i>.</p>
1035+
* @public
1036+
*/
1037+
computeRoleArn?: string | undefined;
10101038
}
10111039

10121040
/**
@@ -1194,6 +1222,15 @@ export interface Branch {
11941222
* @public
11951223
*/
11961224
backend?: Backend | undefined;
1225+
1226+
/**
1227+
* <p>The Amazon Resource Name (ARN) of the IAM role for a branch of an SSR app. The Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources
1228+
* based on the role's permissions. For more information about the SSR Compute role, see
1229+
* <a href="https://docs.aws.amazon.com/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User
1230+
* Guide</i>.</p>
1231+
* @public
1232+
*/
1233+
computeRoleArn?: string | undefined;
11971234
}
11981235

11991236
/**
@@ -2979,7 +3016,17 @@ export interface UpdateAppRequest {
29793016
platform?: Platform | undefined;
29803017

29813018
/**
2982-
* <p>The AWS Identity and Access Management (IAM) service role for an Amplify app. </p>
3019+
* <p>The Amazon Resource Name (ARN) of the IAM role to assign to an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources
3020+
* based on the role's permissions. For more information about the SSR Compute role, see
3021+
* <a href="https://docs.aws.amazon.com/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User
3022+
* Guide</i>.</p>
3023+
* @public
3024+
*/
3025+
computeRoleArn?: string | undefined;
3026+
3027+
/**
3028+
* <p>The Amazon Resource Name
3029+
* (ARN) of the IAM service role for the Amplify app.</p>
29833030
* @public
29843031
*/
29853032
iamServiceRoleArn?: string | undefined;
@@ -3237,6 +3284,15 @@ export interface UpdateBranchRequest {
32373284
* @public
32383285
*/
32393286
backend?: Backend | undefined;
3287+
3288+
/**
3289+
* <p>The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources
3290+
* based on the role's permissions. For more information about the SSR Compute role, see
3291+
* <a href="https://docs.aws.amazon.com/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User
3292+
* Guide</i>.</p>
3293+
* @public
3294+
*/
3295+
computeRoleArn?: string | undefined;
32403296
}
32413297

32423298
/**

clients/client-amplify/src/protocols/Aws_restJson1.ts

+6
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export const se_CreateAppCommand = async (
137137
basicAuthCredentials: [],
138138
buildSpec: [],
139139
cacheConfig: (_) => _json(_),
140+
computeRoleArn: [],
140141
customHeaders: [],
141142
customRules: (_) => _json(_),
142143
description: [],
@@ -203,6 +204,7 @@ export const se_CreateBranchCommand = async (
203204
basicAuthCredentials: [],
204205
branchName: [],
205206
buildSpec: [],
207+
computeRoleArn: [],
206208
description: [],
207209
displayName: [],
208210
enableAutoBuild: [],
@@ -831,6 +833,7 @@ export const se_UpdateAppCommand = async (
831833
basicAuthCredentials: [],
832834
buildSpec: [],
833835
cacheConfig: (_) => _json(_),
836+
computeRoleArn: [],
834837
customHeaders: [],
835838
customRules: (_) => _json(_),
836839
description: [],
@@ -871,6 +874,7 @@ export const se_UpdateBranchCommand = async (
871874
backendEnvironmentArn: [],
872875
basicAuthCredentials: [],
873876
buildSpec: [],
877+
computeRoleArn: [],
874878
description: [],
875879
displayName: [],
876880
enableAutoBuild: [],
@@ -1935,6 +1939,7 @@ const de_App = (output: any, context: __SerdeContext): App => {
19351939
basicAuthCredentials: __expectString,
19361940
buildSpec: __expectString,
19371941
cacheConfig: _json,
1942+
computeRoleArn: __expectString,
19381943
createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
19391944
customHeaders: __expectString,
19401945
customRules: _json,
@@ -2023,6 +2028,7 @@ const de_Branch = (output: any, context: __SerdeContext): Branch => {
20232028
branchArn: __expectString,
20242029
branchName: __expectString,
20252030
buildSpec: __expectString,
2031+
computeRoleArn: __expectString,
20262032
createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
20272033
customDomains: _json,
20282034
description: __expectString,

0 commit comments

Comments
 (0)