Skip to content

Commit 216e571

Browse files
Added WAF Configuration to Amplify Apps
1 parent e9ef598 commit 216e571

File tree

12 files changed

+455
-25
lines changed

12 files changed

+455
-25
lines changed

generator/ServiceModels/amplify/amplify-2017-07-25.api.json

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,9 @@
640640
"autoBranchCreationPatterns":{"shape":"AutoBranchCreationPatterns"},
641641
"autoBranchCreationConfig":{"shape":"AutoBranchCreationConfig"},
642642
"repositoryCloneMethod":{"shape":"RepositoryCloneMethod"},
643-
"cacheConfig":{"shape":"CacheConfig"}
643+
"cacheConfig":{"shape":"CacheConfig"},
644+
"webhookCreateTime":{"shape":"webhookCreateTime"},
645+
"wafConfiguration":{"shape":"WafConfiguration"}
644646
}
645647
},
646648
"AppArn":{
@@ -1659,6 +1661,7 @@
16591661
"JobStatus":{
16601662
"type":"string",
16611663
"enum":[
1664+
"CREATED",
16621665
"PENDING",
16631666
"PROVISIONING",
16641667
"RUNNING",
@@ -2533,6 +2536,30 @@
25332536
"max":1000
25342537
},
25352538
"Verified":{"type":"boolean"},
2539+
"WafConfiguration":{
2540+
"type":"structure",
2541+
"members":{
2542+
"webAclArn":{"shape":"WebAclArn"},
2543+
"wafStatus":{"shape":"WafStatus"},
2544+
"statusReason":{"shape":"StatusReason"}
2545+
}
2546+
},
2547+
"WafStatus":{
2548+
"type":"string",
2549+
"enum":[
2550+
"ASSOCIATING",
2551+
"ASSOCIATION_FAILED",
2552+
"ASSOCIATION_SUCCESS",
2553+
"DISASSOCIATING",
2554+
"DISASSOCIATION_FAILED"
2555+
]
2556+
},
2557+
"WebAclArn":{
2558+
"type":"string",
2559+
"max":512,
2560+
"min":0,
2561+
"pattern":"^arn:aws:wafv2:.*"
2562+
},
25362563
"Webhook":{
25372564
"type":"structure",
25382565
"required":[
@@ -2570,6 +2597,7 @@
25702597
"Webhooks":{
25712598
"type":"list",
25722599
"member":{"shape":"Webhook"}
2573-
}
2600+
},
2601+
"webhookCreateTime":{"type":"timestamp"}
25742602
}
25752603
}

generator/ServiceModels/amplify/amplify-2017-07-25.docs.json

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@
383383
"CommitTime": {
384384
"base": null,
385385
"refs": {
386-
"JobSummary$commitTime": "<p> The commit date and time for the job. </p>",
386+
"JobSummary$commitTime": "<p>The commit date and time for the job. </p>",
387387
"StartJobRequest$commitTime": "<p> The commit date and time for the job. </p>"
388388
}
389389
},
@@ -452,10 +452,10 @@
452452
"CreateTime": {
453453
"base": null,
454454
"refs": {
455-
"App$createTime": "<p>Creates a date and time for the Amplify app. </p>",
455+
"App$createTime": "<p>A timestamp of when Amplify created the application.</p>",
456456
"BackendEnvironment$createTime": "<p>The creation date and time for a backend environment that is part of an Amplify app. </p>",
457-
"Branch$createTime": "<p> The creation date and time for a branch that is part of an Amplify app. </p>",
458-
"Webhook$createTime": "<p>The create date and time for a webhook. </p>"
457+
"Branch$createTime": "<p>A timestamp of when Amplify created the branch.</p>",
458+
"Webhook$createTime": "<p>A timestamp of when Amplify created the webhook in your Git repository.</p>"
459459
}
460460
},
461461
"CreateWebhookRequest": {
@@ -1266,7 +1266,8 @@
12661266
"base": null,
12671267
"refs": {
12681268
"DomainAssociation$statusReason": "<p> Additional information that describes why the domain association is in the current state.</p>",
1269-
"Step$statusReason": "<p> The reason for the current step status. </p>"
1269+
"Step$statusReason": "<p> The reason for the current step status. </p>",
1270+
"WafConfiguration$statusReason": "<p>The reason for the current status of the Firewall configuration.</p>"
12701271
}
12711272
},
12721273
"Step": {
@@ -1463,10 +1464,10 @@
14631464
"UpdateTime": {
14641465
"base": null,
14651466
"refs": {
1466-
"App$updateTime": "<p>Updates the date and time for the Amplify app. </p>",
1467+
"App$updateTime": "<p>A timestamp of when Amplify updated the application.</p>",
14671468
"BackendEnvironment$updateTime": "<p>The last updated date and time for a backend environment that is part of an Amplify app. </p>",
1468-
"Branch$updateTime": "<p> The last updated date and time for a branch that is part of an Amplify app. </p>",
1469-
"Webhook$updateTime": "<p>Updates the date and time for a webhook. </p>"
1469+
"Branch$updateTime": "<p>A timestamp for the last updated time for a branch.</p>",
1470+
"Webhook$updateTime": "<p>A timestamp of when Amplify updated the webhook in your Git repository.</p>"
14701471
}
14711472
},
14721473
"UpdateWebhookRequest": {
@@ -1492,6 +1493,24 @@
14921493
"SubDomain$verified": "<p> The verified status of the subdomain </p>"
14931494
}
14941495
},
1496+
"WafConfiguration": {
1497+
"base": "<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>",
1498+
"refs": {
1499+
"App$wafConfiguration": "<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>"
1500+
}
1501+
},
1502+
"WafStatus": {
1503+
"base": null,
1504+
"refs": {
1505+
"WafConfiguration$wafStatus": "<p>The status of the process to associate or disassociate a web ACL to an Amplify app.</p>"
1506+
}
1507+
},
1508+
"WebAclArn": {
1509+
"base": null,
1510+
"refs": {
1511+
"WafConfiguration$webAclArn": "<p>The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.</p>"
1512+
}
1513+
},
14951514
"Webhook": {
14961515
"base": "<p>Describes a webhook that connects repository events to an Amplify app. </p>",
14971516
"refs": {
@@ -1528,6 +1547,12 @@
15281547
"refs": {
15291548
"ListWebhooksResult$webhooks": "<p>A list of webhooks. </p>"
15301549
}
1550+
},
1551+
"webhookCreateTime": {
1552+
"base": null,
1553+
"refs": {
1554+
"App$webhookCreateTime": "<p>A timestamp of when Amplify created the webhook in your Git repository.</p>"
1555+
}
15311556
}
15321557
}
15331558
}

generator/ServiceModels/amplify/amplify-2017-07-25.normal.json

Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,11 @@
683683
},
684684
"createTime":{
685685
"shape":"CreateTime",
686-
"documentation":"<p>Creates a date and time for the Amplify app. </p>"
686+
"documentation":"<p>A timestamp of when Amplify created the application.</p>"
687687
},
688688
"updateTime":{
689689
"shape":"UpdateTime",
690-
"documentation":"<p>Updates the date and time for the Amplify app. </p>"
690+
"documentation":"<p>A timestamp of when Amplify updated the application.</p>"
691691
},
692692
"iamServiceRoleArn":{
693693
"shape":"ServiceRoleArn",
@@ -752,6 +752,14 @@
752752
"cacheConfig":{
753753
"shape":"CacheConfig",
754754
"documentation":"<p>The cache configuration for the Amplify app. If you don't specify the cache configuration <code>type</code>, Amplify uses the default <code>AMPLIFY_MANAGED</code> setting.</p>"
755+
},
756+
"webhookCreateTime":{
757+
"shape":"webhookCreateTime",
758+
"documentation":"<p>A timestamp of when Amplify created the webhook in your Git repository.</p>"
759+
},
760+
"wafConfiguration":{
761+
"shape":"WafConfiguration",
762+
"documentation":"<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>"
755763
}
756764
},
757765
"documentation":"<p>Represents the different branches of a repository for building, deploying, and hosting an Amplify app. </p>"
@@ -1012,11 +1020,11 @@
10121020
},
10131021
"createTime":{
10141022
"shape":"CreateTime",
1015-
"documentation":"<p> The creation date and time for a branch that is part of an Amplify app. </p>"
1023+
"documentation":"<p>A timestamp of when Amplify created the branch.</p>"
10161024
},
10171025
"updateTime":{
10181026
"shape":"UpdateTime",
1019-
"documentation":"<p> The last updated date and time for a branch that is part of an Amplify app. </p>"
1027+
"documentation":"<p>A timestamp for the last updated time for a branch.</p>"
10201028
},
10211029
"environmentVariables":{
10221030
"shape":"EnvironmentVariables",
@@ -2266,6 +2274,7 @@
22662274
"JobStatus":{
22672275
"type":"string",
22682276
"enum":[
2277+
"CREATED",
22692278
"PENDING",
22702279
"PROVISIONING",
22712280
"RUNNING",
@@ -2310,7 +2319,7 @@
23102319
},
23112320
"commitTime":{
23122321
"shape":"CommitTime",
2313-
"documentation":"<p> The commit date and time for the job. </p>"
2322+
"documentation":"<p>The commit date and time for the job. </p>"
23142323
},
23152324
"startTime":{
23162325
"shape":"StartTime",
@@ -3540,6 +3549,40 @@
35403549
"max":1000
35413550
},
35423551
"Verified":{"type":"boolean"},
3552+
"WafConfiguration":{
3553+
"type":"structure",
3554+
"members":{
3555+
"webAclArn":{
3556+
"shape":"WebAclArn",
3557+
"documentation":"<p>The Amazon Resource Name (ARN) for the web ACL associated with an Amplify app.</p>"
3558+
},
3559+
"wafStatus":{
3560+
"shape":"WafStatus",
3561+
"documentation":"<p>The status of the process to associate or disassociate a web ACL to an Amplify app.</p>"
3562+
},
3563+
"statusReason":{
3564+
"shape":"StatusReason",
3565+
"documentation":"<p>The reason for the current status of the Firewall configuration.</p>"
3566+
}
3567+
},
3568+
"documentation":"<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>"
3569+
},
3570+
"WafStatus":{
3571+
"type":"string",
3572+
"enum":[
3573+
"ASSOCIATING",
3574+
"ASSOCIATION_FAILED",
3575+
"ASSOCIATION_SUCCESS",
3576+
"DISASSOCIATING",
3577+
"DISASSOCIATION_FAILED"
3578+
]
3579+
},
3580+
"WebAclArn":{
3581+
"type":"string",
3582+
"max":512,
3583+
"min":0,
3584+
"pattern":"^arn:aws:wafv2:.*"
3585+
},
35433586
"Webhook":{
35443587
"type":"structure",
35453588
"required":[
@@ -3574,11 +3617,11 @@
35743617
},
35753618
"createTime":{
35763619
"shape":"CreateTime",
3577-
"documentation":"<p>The create date and time for a webhook. </p>"
3620+
"documentation":"<p>A timestamp of when Amplify created the webhook in your Git repository.</p>"
35783621
},
35793622
"updateTime":{
35803623
"shape":"UpdateTime",
3581-
"documentation":"<p>Updates the date and time for a webhook. </p>"
3624+
"documentation":"<p>A timestamp of when Amplify updated the webhook in your Git repository.</p>"
35823625
}
35833626
},
35843627
"documentation":"<p>Describes a webhook that connects repository events to an Amplify app. </p>"
@@ -3599,7 +3642,8 @@
35993642
"Webhooks":{
36003643
"type":"list",
36013644
"member":{"shape":"Webhook"}
3602-
}
3645+
},
3646+
"webhookCreateTime":{"type":"timestamp"}
36033647
},
36043648
"documentation":"<p>Amplify enables developers to develop and deploy cloud-powered mobile and web apps. Amplify Hosting provides a continuous delivery and hosting service for web applications. For more information, see the <a href=\"https://docs.aws.amazon.com/amplify/latest/userguide/welcome.html\">Amplify Hosting User Guide</a>. The Amplify Framework is a comprehensive set of SDKs, libraries, tools, and documentation for client app development. For more information, see the <a href=\"https://docs.amplify.aws/\">Amplify Framework.</a> </p>"
36053649
}

sdk/code-analysis/ServiceAnalysis/Amplify/Generated/PropertyValueRules.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,16 @@
10771077
<max>255</max>
10781078
<pattern>(?s).*</pattern>
10791079
</property-value-rule>
1080+
<property-value-rule>
1081+
<property>Amazon.Amplify.Model.WafConfiguration.StatusReason</property>
1082+
<max>1000</max>
1083+
</property-value-rule>
1084+
<property-value-rule>
1085+
<property>Amazon.Amplify.Model.WafConfiguration.WebAclArn</property>
1086+
<min>0</min>
1087+
<max>512</max>
1088+
<pattern>^arn:aws:wafv2:.*</pattern>
1089+
</property-value-rule>
10801090
<property-value-rule>
10811091
<property>Amazon.Amplify.Model.Webhook.BranchName</property>
10821092
<min>1</min>

sdk/src/Services/Amplify/Generated/Model/App.cs

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public partial class App
6060
private RepositoryCloneMethod _repositoryCloneMethod;
6161
private Dictionary<string, string> _tags = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
6262
private DateTime? _updateTime;
63+
private WafConfiguration _wafConfiguration;
64+
private DateTime? _webhookCreateTime;
6365

6466
/// <summary>
6567
/// Gets and sets the property AppArn.
@@ -197,7 +199,7 @@ internal bool IsSetCacheConfig()
197199
/// <summary>
198200
/// Gets and sets the property CreateTime.
199201
/// <para>
200-
/// Creates a date and time for the Amplify app.
202+
/// A timestamp of when Amplify created the application.
201203
/// </para>
202204
/// </summary>
203205
[AWSProperty(Required=true)]
@@ -538,7 +540,7 @@ internal bool IsSetTags()
538540
/// <summary>
539541
/// Gets and sets the property UpdateTime.
540542
/// <para>
541-
/// Updates the date and time for the Amplify app.
543+
/// A timestamp of when Amplify updated the application.
542544
/// </para>
543545
/// </summary>
544546
[AWSProperty(Required=true)]
@@ -554,5 +556,42 @@ internal bool IsSetUpdateTime()
554556
return this._updateTime.HasValue;
555557
}
556558

559+
/// <summary>
560+
/// Gets and sets the property WafConfiguration.
561+
/// <para>
562+
/// Describes the Firewall configuration for the Amplify app. Firewall support enables
563+
/// you to protect your hosted applications with a direct integration with WAF.
564+
/// </para>
565+
/// </summary>
566+
public WafConfiguration WafConfiguration
567+
{
568+
get { return this._wafConfiguration; }
569+
set { this._wafConfiguration = value; }
570+
}
571+
572+
// Check to see if WafConfiguration property is set
573+
internal bool IsSetWafConfiguration()
574+
{
575+
return this._wafConfiguration != null;
576+
}
577+
578+
/// <summary>
579+
/// Gets and sets the property WebhookCreateTime.
580+
/// <para>
581+
/// A timestamp of when Amplify created the webhook in your Git repository.
582+
/// </para>
583+
/// </summary>
584+
public DateTime WebhookCreateTime
585+
{
586+
get { return this._webhookCreateTime.GetValueOrDefault(); }
587+
set { this._webhookCreateTime = value; }
588+
}
589+
590+
// Check to see if WebhookCreateTime property is set
591+
internal bool IsSetWebhookCreateTime()
592+
{
593+
return this._webhookCreateTime.HasValue;
594+
}
595+
557596
}
558597
}

sdk/src/Services/Amplify/Generated/Model/Branch.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ internal bool IsSetBuildSpec()
221221
/// <summary>
222222
/// Gets and sets the property CreateTime.
223223
/// <para>
224-
/// The creation date and time for a branch that is part of an Amplify app.
224+
/// A timestamp of when Amplify created the branch.
225225
/// </para>
226226
/// </summary>
227227
[AWSProperty(Required=true)]
@@ -587,7 +587,7 @@ internal bool IsSetTtl()
587587
/// <summary>
588588
/// Gets and sets the property UpdateTime.
589589
/// <para>
590-
/// The last updated date and time for a branch that is part of an Amplify app.
590+
/// A timestamp for the last updated time for a branch.
591591
/// </para>
592592
/// </summary>
593593
[AWSProperty(Required=true)]

sdk/src/Services/Amplify/Generated/Model/Internal/MarshallTransformations/AppUnmarshaller.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,18 @@ public App Unmarshall(JsonUnmarshallerContext context)
216216
unmarshalledObject.UpdateTime = unmarshaller.Unmarshall(context);
217217
continue;
218218
}
219+
if (context.TestExpression("wafConfiguration", targetDepth))
220+
{
221+
var unmarshaller = WafConfigurationUnmarshaller.Instance;
222+
unmarshalledObject.WafConfiguration = unmarshaller.Unmarshall(context);
223+
continue;
224+
}
225+
if (context.TestExpression("webhookCreateTime", targetDepth))
226+
{
227+
var unmarshaller = DateTimeUnmarshaller.Instance;
228+
unmarshalledObject.WebhookCreateTime = unmarshaller.Unmarshall(context);
229+
continue;
230+
}
219231
}
220232
return unmarshalledObject;
221233
}

0 commit comments

Comments
 (0)