-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added Translate EventBridge Events for parallel data state change and job state change
- Loading branch information
Showing
8 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...es/src/Amazon.Lambda.CloudWatchEvents/TranslateEvents/TranslateParallelDataStateChange.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
|
||
namespace Amazon.Lambda.CloudWatchEvents.TranslateEvents | ||
{ | ||
/// <summary> | ||
/// This class represents the details of a Translate Parallel Data State Change | ||
// for CreateParallelData and UpdateParallelData events sent via EventBridge. | ||
/// For more see - https://docs.aws.amazon.com/translate/latest/dg/monitoring-with-eventbridge.html | ||
/// </summary> | ||
public class TranslateParallelDataStateChange | ||
{ | ||
/// <summary> | ||
/// The CreateParallelData/UpdateParallelData operation. | ||
/// </summary> | ||
public string Operation { get; set; } | ||
|
||
/// <summary> | ||
/// The CreateParallelData/UpdateParallelData name. | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// The CreateParallelData/UpdateParallelData status. | ||
/// </summary> | ||
public string Status { get; set; } | ||
|
||
/// <summary> | ||
/// The UpdateParallelData latest update attempt status. | ||
/// </summary> | ||
public string LatestUpdateAttemptStatus { get; set; } | ||
|
||
/// <summary> | ||
/// The UpdateParallelData latest update attempt at. | ||
/// </summary> | ||
public DateTime LatestUpdateAttemptAt { get; set; } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...c/Amazon.Lambda.CloudWatchEvents/TranslateEvents/TranslateParallelDataStateChangeEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Amazon.Lambda.CloudWatchEvents.TranslateEvents | ||
{ | ||
/// <summary> | ||
/// This class represents a Translate Parallel Data State Change sent via EventBridge. | ||
/// </summary> | ||
public class TranslateParallelDataStateChangeEvent : CloudWatchEvent<TranslateParallelDataStateChange>{ } | ||
} |
19 changes: 19 additions & 0 deletions
19
.../Amazon.Lambda.CloudWatchEvents/TranslateEvents/TranslateTextTranslationJobStateChange.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace Amazon.Lambda.CloudWatchEvents.TranslateEvents | ||
{ | ||
/// <summary> | ||
/// This class represents the details of a Translate Text Translation Job State Change sent via EventBridge. | ||
/// For more see - https://docs.aws.amazon.com/translate/latest/dg/monitoring-with-eventbridge.html | ||
/// </summary> | ||
public class TranslateTextTranslationJobStateChange | ||
{ | ||
/// <summary> | ||
/// The translation job id. | ||
/// </summary> | ||
public string JobId { get; set; } | ||
|
||
/// <summary> | ||
/// The translation job status. | ||
/// </summary> | ||
public string JobStatus { get; set; } | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...on.Lambda.CloudWatchEvents/TranslateEvents/TranslateTextTranslationJobStateChangeEvent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Amazon.Lambda.CloudWatchEvents.TranslateEvents | ||
{ | ||
/// <summary> | ||
/// This class represents a Translate Text Translation Job State Change sent via EventBridge. | ||
/// </summary> | ||
public class TranslateTextTranslationJobStateChangeEvent : CloudWatchEvent<TranslateTextTranslationJobStateChange>{ } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...ies/test/EventsTests.Shared/cloudwatchevents-translateparalleldatastatechange-create.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"version": "0", | ||
"id": "e99030f3-a7a8-42f5-923a-684fbf9bff65", | ||
"detail-type": "Translate Parallel Data State Change", | ||
"source": "aws.translate", | ||
"account": "111122223333", | ||
"time": "2017-04-22T03:31:47Z", | ||
"region": "us-east-1", | ||
"resources": [ | ||
"arn:aws:translate:us-east-1:111122223333:parallel-data/ExampleParallelData" | ||
], | ||
"detail": { | ||
"operation": "CreateParallelData", | ||
"name": "ExampleParallelData", | ||
"status": "ACTIVE" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...ies/test/EventsTests.Shared/cloudwatchevents-translateparalleldatastatechange-update.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"version": "0", | ||
"id": "920d9de3-fbd0-4cfb-87aa-e35b5f7cba8f", | ||
"detail-type": "Translate Parallel Data State Change", | ||
"source": "aws.translate", | ||
"account": "111122223333", | ||
"time": "2017-04-22T03:31:47Z", | ||
"region": "us-east-1", | ||
"resources": [ | ||
"arn:aws:translate:us-east-1:111122223333:parallel-data/ExampleParallelData" | ||
], | ||
"detail": { | ||
"operation": "UpdateParallelData", | ||
"name": "ExampleParallelData2", | ||
"status": "ACTIVE", | ||
"latestUpdateAttemptStatus": "ACTIVE", | ||
"latestUpdateAttemptAt": "2023-03-02T03:31:47Z" | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...ries/test/EventsTests.Shared/cloudwatchevents-translatetexttranslationjobstatechange.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"version": "0", | ||
"id": "8882c5af-c9da-4a58-99e2-91fbe33b9e52", | ||
"detail-type": "Translate TextTranslationJob State Change", | ||
"source": "aws.translate", | ||
"account": "111122223333", | ||
"time": "2017-04-22T03:31:47Z", | ||
"region": "us-east-1", | ||
"resources": [], | ||
"detail": { | ||
"jobId": "8ce682a1-9be8-4f2c-875c-f8ae2fe1b015", | ||
"jobStatus": "COMPLETED" | ||
} | ||
} |