Skip to content

Commit

Permalink
feat(client-amplify): Added WAF Configuration to Amplify Apps
Browse files Browse the repository at this point in the history
  • Loading branch information
awstools committed Dec 18, 2024
1 parent 4e1a96b commit be98eba
Show file tree
Hide file tree
Showing 14 changed files with 206 additions and 21 deletions.
6 changes: 6 additions & 0 deletions clients/client-amplify/src/commands/CreateAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ export interface CreateAppCommandOutput extends CreateAppResult, __MetadataBeare
* // cacheConfig: { // CacheConfig
* // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required
* // },
* // webhookCreateTime: new Date("TIMESTAMP"),
* // wafConfiguration: { // WafConfiguration
* // webAclArn: "STRING_VALUE",
* // wafStatus: "ASSOCIATING" || "ASSOCIATION_FAILED" || "ASSOCIATION_SUCCESS" || "DISASSOCIATING" || "DISASSOCIATION_FAILED",
* // statusReason: "STRING_VALUE",
* // },
* // },
* // };
*
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amplify/src/commands/DeleteAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ export interface DeleteAppCommandOutput extends DeleteAppResult, __MetadataBeare
* // cacheConfig: { // CacheConfig
* // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required
* // },
* // webhookCreateTime: new Date("TIMESTAMP"),
* // wafConfiguration: { // WafConfiguration
* // webAclArn: "STRING_VALUE",
* // wafStatus: "ASSOCIATING" || "ASSOCIATION_FAILED" || "ASSOCIATION_SUCCESS" || "DISASSOCIATING" || "DISASSOCIATION_FAILED",
* // statusReason: "STRING_VALUE",
* // },
* // },
* // };
*
Expand Down
2 changes: 1 addition & 1 deletion clients/client-amplify/src/commands/DeleteJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface DeleteJobCommandOutput extends DeleteJobResult, __MetadataBeare
* // commitMessage: "STRING_VALUE", // required
* // commitTime: new Date("TIMESTAMP"), // required
* // startTime: new Date("TIMESTAMP"), // required
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amplify/src/commands/GetAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ export interface GetAppCommandOutput extends GetAppResult, __MetadataBearer {}
* // cacheConfig: { // CacheConfig
* // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required
* // },
* // webhookCreateTime: new Date("TIMESTAMP"),
* // wafConfiguration: { // WafConfiguration
* // webAclArn: "STRING_VALUE",
* // wafStatus: "ASSOCIATING" || "ASSOCIATION_FAILED" || "ASSOCIATION_SUCCESS" || "DISASSOCIATING" || "DISASSOCIATION_FAILED",
* // statusReason: "STRING_VALUE",
* // },
* // },
* // };
*
Expand Down
4 changes: 2 additions & 2 deletions clients/client-amplify/src/commands/GetJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface GetJobCommandOutput extends GetJobResult, __MetadataBearer {}
* // commitMessage: "STRING_VALUE", // required
* // commitTime: new Date("TIMESTAMP"), // required
* // startTime: new Date("TIMESTAMP"), // required
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
Expand All @@ -61,7 +61,7 @@ export interface GetJobCommandOutput extends GetJobResult, __MetadataBearer {}
* // { // Step
* // stepName: "STRING_VALUE", // required
* // startTime: new Date("TIMESTAMP"), // required
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"), // required
* // logUrl: "STRING_VALUE",
* // artifactsUrl: "STRING_VALUE",
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amplify/src/commands/ListAppsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ export interface ListAppsCommandOutput extends ListAppsResult, __MetadataBearer
* // cacheConfig: { // CacheConfig
* // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required
* // },
* // webhookCreateTime: new Date("TIMESTAMP"),
* // wafConfiguration: { // WafConfiguration
* // webAclArn: "STRING_VALUE",
* // wafStatus: "ASSOCIATING" || "ASSOCIATION_FAILED" || "ASSOCIATION_SUCCESS" || "DISASSOCIATING" || "DISASSOCIATION_FAILED",
* // statusReason: "STRING_VALUE",
* // },
* // },
* // ],
* // nextToken: "STRING_VALUE",
Expand Down
2 changes: 1 addition & 1 deletion clients/client-amplify/src/commands/ListJobsCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export interface ListJobsCommandOutput extends ListJobsResult, __MetadataBearer
* // commitMessage: "STRING_VALUE", // required
* // commitTime: new Date("TIMESTAMP"), // required
* // startTime: new Date("TIMESTAMP"), // required
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface StartDeploymentCommandOutput extends StartDeploymentResult, __M
* // commitMessage: "STRING_VALUE", // required
* // commitTime: new Date("TIMESTAMP"), // required
* // startTime: new Date("TIMESTAMP"), // required
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
Expand Down
2 changes: 1 addition & 1 deletion clients/client-amplify/src/commands/StartJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface StartJobCommandOutput extends StartJobResult, __MetadataBearer
* // commitMessage: "STRING_VALUE", // required
* // commitTime: new Date("TIMESTAMP"), // required
* // startTime: new Date("TIMESTAMP"), // required
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
Expand Down
2 changes: 1 addition & 1 deletion clients/client-amplify/src/commands/StopJobCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface StopJobCommandOutput extends StopJobResult, __MetadataBearer {}
* // commitMessage: "STRING_VALUE", // required
* // commitTime: new Date("TIMESTAMP"), // required
* // startTime: new Date("TIMESTAMP"), // required
* // status: "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // status: "CREATED" || "PENDING" || "PROVISIONING" || "RUNNING" || "FAILED" || "SUCCEED" || "CANCELLING" || "CANCELLED", // required
* // endTime: new Date("TIMESTAMP"),
* // jobType: "RELEASE" || "RETRY" || "MANUAL" || "WEB_HOOK", // required
* // sourceUrl: "STRING_VALUE",
Expand Down
6 changes: 6 additions & 0 deletions clients/client-amplify/src/commands/UpdateAppCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ export interface UpdateAppCommandOutput extends UpdateAppResult, __MetadataBeare
* // cacheConfig: { // CacheConfig
* // type: "AMPLIFY_MANAGED" || "AMPLIFY_MANAGED_NO_COOKIES", // required
* // },
* // webhookCreateTime: new Date("TIMESTAMP"),
* // wafConfiguration: { // WafConfiguration
* // webAclArn: "STRING_VALUE",
* // wafStatus: "ASSOCIATING" || "ASSOCIATION_FAILED" || "ASSOCIATION_SUCCESS" || "DISASSOCIATING" || "DISASSOCIATION_FAILED",
* // statusReason: "STRING_VALUE",
* // },
* // },
* // };
*
Expand Down
73 changes: 66 additions & 7 deletions clients/client-amplify/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,51 @@ export const RepositoryCloneMethod = {
*/
export type RepositoryCloneMethod = (typeof RepositoryCloneMethod)[keyof typeof RepositoryCloneMethod];

/**
* @public
* @enum
*/
export const WafStatus = {
ASSOCIATING: "ASSOCIATING",
ASSOCIATION_FAILED: "ASSOCIATION_FAILED",
ASSOCIATION_SUCCESS: "ASSOCIATION_SUCCESS",
DISASSOCIATING: "DISASSOCIATING",
DISASSOCIATION_FAILED: "DISASSOCIATION_FAILED",
} as const;

/**
* @public
*/
export type WafStatus = (typeof WafStatus)[keyof typeof WafStatus];

/**
* <p>Describes the Firewall configuration for a hosted Amplify application.
* Firewall support enables you to protect your web applications with a direct integration
* with WAF. For more information about using WAF protections for an Amplify application, see
* <a href="https://docs.aws.amazon.com/amplify/latest/userguide/WAF-integration.html">Firewall support for hosted sites</a> in the <i>Amplify
* User Guide</i>. </p>
* @public
*/
export interface WafConfiguration {
/**
* <p>The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.</p>
* @public
*/
webAclArn?: string | undefined;

/**
* <p>The status of the process to associate or disassociate a web ACL to an Amplify app.</p>
* @public
*/
wafStatus?: WafStatus | undefined;

/**
* <p>The reason for the current status of the Firewall configuration.</p>
* @public
*/
statusReason?: string | undefined;
}

/**
* <p>Represents the different branches of a repository for building, deploying, and hosting
* an Amplify app. </p>
Expand Down Expand Up @@ -475,13 +520,13 @@ export interface App {
platform: Platform | undefined;

/**
* <p>Creates a date and time for the Amplify app. </p>
* <p>A timestamp of when Amplify created the application.</p>
* @public
*/
createTime: Date | undefined;

/**
* <p>Updates the date and time for the Amplify app. </p>
* <p>A timestamp of when Amplify updated the application.</p>
* @public
*/
updateTime: Date | undefined;
Expand Down Expand Up @@ -598,6 +643,19 @@ export interface App {
* @public
*/
cacheConfig?: CacheConfig | undefined;

/**
* <p>A timestamp of when Amplify created the webhook in your Git repository.</p>
* @public
*/
webhookCreateTime?: Date | undefined;

/**
* <p>Describes the Firewall configuration for the Amplify app. Firewall support enables you to protect your hosted applications with a direct integration
* with WAF.</p>
* @public
*/
wafConfiguration?: WafConfiguration | undefined;
}

/**
Expand Down Expand Up @@ -999,13 +1057,13 @@ export interface Branch {
enableNotification: boolean | undefined;

/**
* <p> The creation date and time for a branch that is part of an Amplify app. </p>
* <p>A timestamp of when Amplify created the branch.</p>
* @public
*/
createTime: Date | undefined;

/**
* <p> The last updated date and time for a branch that is part of an Amplify app. </p>
* <p>A timestamp for the last updated time for a branch.</p>
* @public
*/
updateTime: Date | undefined;
Expand Down Expand Up @@ -1615,13 +1673,13 @@ export interface Webhook {
description: string | undefined;

/**
* <p>The create date and time for a webhook. </p>
* <p>A timestamp of when Amplify created the webhook in your Git repository.</p>
* @public
*/
createTime: Date | undefined;

/**
* <p>Updates the date and time for a webhook. </p>
* <p>A timestamp of when Amplify updated the webhook in your Git repository.</p>
* @public
*/
updateTime: Date | undefined;
Expand Down Expand Up @@ -1814,6 +1872,7 @@ export type SourceUrlType = (typeof SourceUrlType)[keyof typeof SourceUrlType];
export const JobStatus = {
CANCELLED: "CANCELLED",
CANCELLING: "CANCELLING",
CREATED: "CREATED",
FAILED: "FAILED",
PENDING: "PENDING",
PROVISIONING: "PROVISIONING",
Expand Down Expand Up @@ -1856,7 +1915,7 @@ export interface JobSummary {
commitMessage: string | undefined;

/**
* <p> The commit date and time for the job. </p>
* <p>The commit date and time for the job. </p>
* @public
*/
commitTime: Date | undefined;
Expand Down
4 changes: 4 additions & 0 deletions clients/client-amplify/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1953,6 +1953,8 @@ const de_App = (output: any, context: __SerdeContext): App => {
repositoryCloneMethod: __expectString,
tags: _json,
updateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
wafConfiguration: _json,
webhookCreateTime: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
}) as any;
};

Expand Down Expand Up @@ -2168,6 +2170,8 @@ const de_Steps = (output: any, context: __SerdeContext): Step[] => {

// de_TagMap omitted.

// de_WafConfiguration omitted.

/**
* deserializeAws_restJson1Webhook
*/
Expand Down
Loading

0 comments on commit be98eba

Please sign in to comment.