Skip to content

Commit

Permalink
feat(client-amplify): Add ComputeRoleArn to CreateApp, UpdateApp, Cre…
Browse files Browse the repository at this point in the history
…ateBranch, and UpdateBranch, allowing caller to specify a role to be assumed by Amplify Hosting for server-side rendered applications.
  • Loading branch information
awstools committed Feb 17, 2025
1 parent e7db4d8 commit 3c35c6e
Show file tree
Hide file tree
Showing 13 changed files with 129 additions and 7 deletions.
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/CreateAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface CreateAppCommandOutput extends CreateAppResult, __MetadataBeare
* description: "STRING_VALUE",
* repository: "STRING_VALUE",
* platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE",
* computeRoleArn: "STRING_VALUE",
* iamServiceRoleArn: "STRING_VALUE",
* oauthToken: "STRING_VALUE",
* accessToken: "STRING_VALUE",
Expand Down Expand Up @@ -105,6 +106,7 @@ export interface CreateAppCommandOutput extends CreateAppResult, __MetadataBeare
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // computeRoleArn: "STRING_VALUE",
* // iamServiceRoleArn: "STRING_VALUE",
* // environmentVariables: { // EnvironmentVariables // required
* // "<keys>": "STRING_VALUE",
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/CreateBranchCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export interface CreateBranchCommandOutput extends CreateBranchResult, __Metadat
* backend: { // Backend
* stackArn: "STRING_VALUE",
* },
* computeRoleArn: "STRING_VALUE",
* };
* const command = new CreateBranchCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -109,6 +110,7 @@ export interface CreateBranchCommandOutput extends CreateBranchResult, __Metadat
* // backend: { // Backend
* // stackArn: "STRING_VALUE",
* // },
* // computeRoleArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-amplify/src/commands/DeleteAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface DeleteAppCommandOutput extends DeleteAppResult, __MetadataBeare
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // computeRoleArn: "STRING_VALUE",
* // iamServiceRoleArn: "STRING_VALUE",
* // environmentVariables: { // EnvironmentVariables // required
* // "<keys>": "STRING_VALUE",
Expand Down
1 change: 1 addition & 0 deletions clients/client-amplify/src/commands/DeleteBranchCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export interface DeleteBranchCommandOutput extends DeleteBranchResult, __Metadat
* // backend: { // Backend
* // stackArn: "STRING_VALUE",
* // },
* // computeRoleArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-amplify/src/commands/GetAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export interface GetAppCommandOutput extends GetAppResult, __MetadataBearer {}
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // computeRoleArn: "STRING_VALUE",
* // iamServiceRoleArn: "STRING_VALUE",
* // environmentVariables: { // EnvironmentVariables // required
* // "<keys>": "STRING_VALUE",
Expand Down
1 change: 1 addition & 0 deletions clients/client-amplify/src/commands/GetBranchCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export interface GetBranchCommandOutput extends GetBranchResult, __MetadataBeare
* // backend: { // Backend
* // stackArn: "STRING_VALUE",
* // },
* // computeRoleArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
1 change: 1 addition & 0 deletions clients/client-amplify/src/commands/ListAppsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface ListAppsCommandOutput extends ListAppsResult, __MetadataBearer
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // computeRoleArn: "STRING_VALUE",
* // iamServiceRoleArn: "STRING_VALUE",
* // environmentVariables: { // EnvironmentVariables // required
* // "<keys>": "STRING_VALUE",
Expand Down
1 change: 1 addition & 0 deletions clients/client-amplify/src/commands/ListBranchesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export interface ListBranchesCommandOutput extends ListBranchesResult, __Metadat
* // backend: { // Backend
* // stackArn: "STRING_VALUE",
* // },
* // computeRoleArn: "STRING_VALUE",
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/UpdateAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface UpdateAppCommandOutput extends UpdateAppResult, __MetadataBeare
* name: "STRING_VALUE",
* description: "STRING_VALUE",
* platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE",
* computeRoleArn: "STRING_VALUE",
* iamServiceRoleArn: "STRING_VALUE",
* environmentVariables: { // EnvironmentVariables
* "<keys>": "STRING_VALUE",
Expand Down Expand Up @@ -103,6 +104,7 @@ export interface UpdateAppCommandOutput extends UpdateAppResult, __MetadataBeare
* // platform: "WEB" || "WEB_DYNAMIC" || "WEB_COMPUTE", // required
* // createTime: new Date("TIMESTAMP"), // required
* // updateTime: new Date("TIMESTAMP"), // required
* // computeRoleArn: "STRING_VALUE",
* // iamServiceRoleArn: "STRING_VALUE",
* // environmentVariables: { // EnvironmentVariables // required
* // "<keys>": "STRING_VALUE",
Expand Down
2 changes: 2 additions & 0 deletions clients/client-amplify/src/commands/UpdateBranchCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export interface UpdateBranchCommandOutput extends UpdateBranchResult, __Metadat
* backend: { // Backend
* stackArn: "STRING_VALUE",
* },
* computeRoleArn: "STRING_VALUE",
* };
* const command = new UpdateBranchCommand(input);
* const response = await client.send(command);
Expand Down Expand Up @@ -106,6 +107,7 @@ export interface UpdateBranchCommandOutput extends UpdateBranchResult, __Metadat
* // backend: { // Backend
* // stackArn: "STRING_VALUE",
* // },
* // computeRoleArn: "STRING_VALUE",
* // },
* // };
*
Expand Down
64 changes: 60 additions & 4 deletions clients/client-amplify/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,17 @@ export interface CreateAppRequest {
platform?: Platform | undefined;

/**
* <p>The AWS Identity and Access Management (IAM) service role for an Amplify app. </p>
* <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
* based on the role's permissions. For more information about the SSR Compute role, see
* <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
* Guide</i>.</p>
* @public
*/
computeRoleArn?: string | undefined;

/**
* <p>The Amazon Resource Name
* (ARN) of the IAM service role for the Amplify app.</p>
* @public
*/
iamServiceRoleArn?: string | undefined;
Expand Down Expand Up @@ -532,8 +542,17 @@ export interface App {
updateTime: Date | undefined;

/**
* <p>The AWS Identity and Access Management (IAM) service role for the Amazon Resource Name
* (ARN) of the Amplify app. </p>
* <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
* based on the role's permissions. For more information about the SSR Compute role, see
* <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
* Guide</i>.</p>
* @public
*/
computeRoleArn?: string | undefined;

/**
* <p>The Amazon Resource Name
* (ARN) of the IAM service role for the Amplify app.</p>
* @public
*/
iamServiceRoleArn?: string | undefined;
Expand Down Expand Up @@ -1007,6 +1026,15 @@ export interface CreateBranchRequest {
* @public
*/
backend?: Backend | undefined;

/**
* <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
* based on the role's permissions. For more information about the SSR Compute role, see
* <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
* Guide</i>.</p>
* @public
*/
computeRoleArn?: string | undefined;
}

/**
Expand Down Expand Up @@ -1194,6 +1222,15 @@ export interface Branch {
* @public
*/
backend?: Backend | undefined;

/**
* <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
* based on the role's permissions. For more information about the SSR Compute role, see
* <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
* Guide</i>.</p>
* @public
*/
computeRoleArn?: string | undefined;
}

/**
Expand Down Expand Up @@ -2979,7 +3016,17 @@ export interface UpdateAppRequest {
platform?: Platform | undefined;

/**
* <p>The AWS Identity and Access Management (IAM) service role for an Amplify app. </p>
* <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
* based on the role's permissions. For more information about the SSR Compute role, see
* <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
* Guide</i>.</p>
* @public
*/
computeRoleArn?: string | undefined;

/**
* <p>The Amazon Resource Name
* (ARN) of the IAM service role for the Amplify app.</p>
* @public
*/
iamServiceRoleArn?: string | undefined;
Expand Down Expand Up @@ -3237,6 +3284,15 @@ export interface UpdateBranchRequest {
* @public
*/
backend?: Backend | undefined;

/**
* <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
* based on the role's permissions. For more information about the SSR Compute role, see
* <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
* Guide</i>.</p>
* @public
*/
computeRoleArn?: string | undefined;
}

/**
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amplify/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export const se_CreateAppCommand = async (
basicAuthCredentials: [],
buildSpec: [],
cacheConfig: (_) => _json(_),
computeRoleArn: [],
customHeaders: [],
customRules: (_) => _json(_),
description: [],
Expand Down Expand Up @@ -203,6 +204,7 @@ export const se_CreateBranchCommand = async (
basicAuthCredentials: [],
branchName: [],
buildSpec: [],
computeRoleArn: [],
description: [],
displayName: [],
enableAutoBuild: [],
Expand Down Expand Up @@ -831,6 +833,7 @@ export const se_UpdateAppCommand = async (
basicAuthCredentials: [],
buildSpec: [],
cacheConfig: (_) => _json(_),
computeRoleArn: [],
customHeaders: [],
customRules: (_) => _json(_),
description: [],
Expand Down Expand Up @@ -871,6 +874,7 @@ export const se_UpdateBranchCommand = async (
backendEnvironmentArn: [],
basicAuthCredentials: [],
buildSpec: [],
computeRoleArn: [],
description: [],
displayName: [],
enableAutoBuild: [],
Expand Down Expand Up @@ -1935,6 +1939,7 @@ const de_App = (output: any, context: __SerdeContext): App => {
basicAuthCredentials: __expectString,
buildSpec: __expectString,
cacheConfig: _json,
computeRoleArn: __expectString,
createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
customHeaders: __expectString,
customRules: _json,
Expand Down Expand Up @@ -2023,6 +2028,7 @@ const de_Branch = (output: any, context: __SerdeContext): Branch => {
branchArn: __expectString,
branchName: __expectString,
buildSpec: __expectString,
computeRoleArn: __expectString,
createTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
customDomains: _json,
description: __expectString,
Expand Down
Loading

0 comments on commit 3c35c6e

Please sign in to comment.