Skip to content

Commit 7467f15

Browse files
author
awstools
committed
feat(client-synthetics): Add support to change ephemeral storage. Add a new field "TestResult" under CanaryRunStatus.
1 parent 9f438f0 commit 7467f15

File tree

9 files changed

+128
-31
lines changed

9 files changed

+128
-31
lines changed

clients/client-synthetics/src/commands/CreateCanaryCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ export interface CreateCanaryCommandOutput extends CreateCanaryResponse, __Metad
7373
* EnvironmentVariables: { // EnvironmentVariablesMap
7474
* "<keys>": "STRING_VALUE",
7575
* },
76+
* EphemeralStorage: Number("int"),
7677
* },
7778
* SuccessRetentionPeriodInDays: Number("int"),
7879
* FailureRetentionPeriodInDays: Number("int"),
@@ -122,6 +123,7 @@ export interface CreateCanaryCommandOutput extends CreateCanaryResponse, __Metad
122123
* // TimeoutInSeconds: Number("int"),
123124
* // MemoryInMB: Number("int"),
124125
* // ActiveTracing: true || false,
126+
* // EphemeralStorage: Number("int"),
125127
* // },
126128
* // SuccessRetentionPeriodInDays: Number("int"),
127129
* // FailureRetentionPeriodInDays: Number("int"),

clients/client-synthetics/src/commands/DescribeCanariesCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export interface DescribeCanariesCommandOutput extends DescribeCanariesResponse,
7474
* // TimeoutInSeconds: Number("int"),
7575
* // MemoryInMB: Number("int"),
7676
* // ActiveTracing: true || false,
77+
* // EphemeralStorage: Number("int"),
7778
* // },
7879
* // SuccessRetentionPeriodInDays: Number("int"),
7980
* // FailureRetentionPeriodInDays: Number("int"),

clients/client-synthetics/src/commands/DescribeCanariesLastRunCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface DescribeCanariesLastRunCommandOutput extends DescribeCanariesLa
6565
* // State: "RUNNING" || "PASSED" || "FAILED",
6666
* // StateReason: "STRING_VALUE",
6767
* // StateReasonCode: "CANARY_FAILURE" || "EXECUTION_FAILURE",
68+
* // TestResult: "PASSED" || "FAILED" || "UNKNOWN",
6869
* // },
6970
* // Timeline: { // CanaryRunTimeline
7071
* // Started: new Date("TIMESTAMP"),

clients/client-synthetics/src/commands/GetCanaryCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface GetCanaryCommandOutput extends GetCanaryResponse, __MetadataBea
6363
* // TimeoutInSeconds: Number("int"),
6464
* // MemoryInMB: Number("int"),
6565
* // ActiveTracing: true || false,
66+
* // EphemeralStorage: Number("int"),
6667
* // },
6768
* // SuccessRetentionPeriodInDays: Number("int"),
6869
* // FailureRetentionPeriodInDays: Number("int"),

clients/client-synthetics/src/commands/GetCanaryRunsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export interface GetCanaryRunsCommandOutput extends GetCanaryRunsResponse, __Met
5555
* // State: "RUNNING" || "PASSED" || "FAILED",
5656
* // StateReason: "STRING_VALUE",
5757
* // StateReasonCode: "CANARY_FAILURE" || "EXECUTION_FAILURE",
58+
* // TestResult: "PASSED" || "FAILED" || "UNKNOWN",
5859
* // },
5960
* // Timeline: { // CanaryRunTimeline
6061
* // Started: new Date("TIMESTAMP"),

clients/client-synthetics/src/commands/StartCanaryDryRunCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export interface StartCanaryDryRunCommandOutput extends StartCanaryDryRunRespons
5252
* EnvironmentVariables: { // EnvironmentVariablesMap
5353
* "<keys>": "STRING_VALUE",
5454
* },
55+
* EphemeralStorage: Number("int"),
5556
* },
5657
* VpcConfig: { // VpcConfigInput
5758
* SubnetIds: [ // SubnetIds

clients/client-synthetics/src/commands/UpdateCanaryCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface UpdateCanaryCommandOutput extends UpdateCanaryResponse, __Metad
6767
* EnvironmentVariables: { // EnvironmentVariablesMap
6868
* "<keys>": "STRING_VALUE",
6969
* },
70+
* EphemeralStorage: Number("int"),
7071
* },
7172
* SuccessRetentionPeriodInDays: Number("int"),
7273
* FailureRetentionPeriodInDays: Number("int"),

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

Lines changed: 56 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,12 @@ export interface CanaryRunConfigOutput {
353353
* @public
354354
*/
355355
ActiveTracing?: boolean | undefined;
356+
357+
/**
358+
* <p>Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during execution. This temporary storage is used for storing canary run artifacts (which are uploaded to an Amazon S3 bucket at the end of the run), and any canary browser operations. This temporary storage is cleared after the run is completed. Default storage value is 1024 MB.</p>
359+
* @public
360+
*/
361+
EphemeralStorage?: number | undefined;
356362
}
357363

358364
/**
@@ -745,6 +751,21 @@ export const CanaryRunStateReasonCode = {
745751
*/
746752
export type CanaryRunStateReasonCode = (typeof CanaryRunStateReasonCode)[keyof typeof CanaryRunStateReasonCode];
747753

754+
/**
755+
* @public
756+
* @enum
757+
*/
758+
export const CanaryRunTestResult = {
759+
FAILED: "FAILED",
760+
PASSED: "PASSED",
761+
UNKNOWN: "UNKNOWN",
762+
} as const;
763+
764+
/**
765+
* @public
766+
*/
767+
export type CanaryRunTestResult = (typeof CanaryRunTestResult)[keyof typeof CanaryRunTestResult];
768+
748769
/**
749770
* <p>This structure contains the status information about a canary run.</p>
750771
* @public
@@ -763,12 +784,20 @@ export interface CanaryRunStatus {
763784
StateReason?: string | undefined;
764785

765786
/**
766-
* <p>If this value is <code>CANARY_FAILURE</code>, an exception occurred in the
767-
* canary code. If this value is <code>EXECUTION_FAILURE</code>, an exception occurred in
768-
* CloudWatch Synthetics.</p>
787+
* <p>If this value is <code>CANARY_FAILURE</code>, either the canary script failed or Synthetics ran into a fatal error when running the canary. For example, a canary timeout misconfiguration setting can cause the canary to timeout before Synthetics can evaluate its status.
788+
* </p>
789+
* <p> If this value is <code>EXECUTION_FAILURE</code>, a non-critical failure occurred such as failing to save generated debug artifacts (for example, screenshots or har files).</p>
790+
* <p>If both types of failures occurred, the <code>CANARY_FAILURE</code> takes precedence. To understand the exact error, use the <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRunStatus.html">StateReason</a> API.</p>
769791
* @public
770792
*/
771793
StateReasonCode?: CanaryRunStateReasonCode | undefined;
794+
795+
/**
796+
* <p>Specifies the status of canary script for this run. When Synthetics tries to determine the status but fails, the result is marked as <code>UNKNOWN</code>.
797+
* For the overall status of canary run, see <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRunStatus.html">State</a>.</p>
798+
* @public
799+
*/
800+
TestResult?: CanaryRunTestResult | undefined;
772801
}
773802

774803
/**
@@ -871,7 +900,7 @@ export interface CanaryLastRun {
871900
/**
872901
* <p>Use this structure to input your script code for the canary. This structure contains the
873902
* Lambda handler with the location where the canary should start running the script. If the
874-
* script is stored in an S3 bucket, the bucket name, key, and version are also included. If
903+
* script is stored in an Amazon S3 bucket, the bucket name, key, and version are also included. If
875904
* the script was passed into the canary directly, the script code is contained in the value
876905
* of <code>Zipfile</code>. </p>
877906
* <p>If you are uploading your canary scripts with an Amazon S3 bucket, your zip file should include your
@@ -895,29 +924,29 @@ export interface CanaryLastRun {
895924
*/
896925
export interface CanaryCodeInput {
897926
/**
898-
* <p>If your canary script is located in S3, specify the bucket name here. Do not include <code>s3://</code> as the
927+
* <p>If your canary script is located in Amazon S3, specify the bucket name here. Do not include <code>s3://</code> as the
899928
* start of the bucket name.</p>
900929
* @public
901930
*/
902931
S3Bucket?: string | undefined;
903932

904933
/**
905-
* <p>The S3 key of your script. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html">Working with Amazon S3 Objects</a>.</p>
934+
* <p>The Amazon S3 key of your script. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html">Working with Amazon S3 Objects</a>.</p>
906935
* @public
907936
*/
908937
S3Key?: string | undefined;
909938

910939
/**
911-
* <p>The S3 version ID of your script.</p>
940+
* <p>The Amazon S3 version ID of your script.</p>
912941
* @public
913942
*/
914943
S3Version?: string | undefined;
915944

916945
/**
917-
* <p>If you input your canary script directly into the canary instead of referring to an S3
946+
* <p>If you input your canary script directly into the canary instead of referring to an Amazon S3
918947
* location, the value of this parameter is the base64-encoded contents of the .zip file that
919948
* contains the script. It must be smaller than 225 Kb.</p>
920-
* <p>For large canary scripts, we recommend that you use an S3 location instead of inputting it
949+
* <p>For large canary scripts, we recommend that you use an Amazon S3 location instead of inputting it
921950
* directly with this parameter.</p>
922951
* @public
923952
*/
@@ -992,6 +1021,12 @@ export interface CanaryRunConfigInput {
9921021
* @public
9931022
*/
9941023
EnvironmentVariables?: Record<string, string> | undefined;
1024+
1025+
/**
1026+
* <p>Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during execution. This temporary storage is used for storing canary run artifacts (which are uploaded to an Amazon S3 bucket at the end of the run), and any canary browser operations. This temporary storage is cleared after the run is completed. Default storage value is 1024 MB.</p>
1027+
* @public
1028+
*/
1029+
EphemeralStorage?: number | undefined;
9951030
}
9961031

9971032
/**
@@ -1112,7 +1147,7 @@ export interface CreateCanaryRequest {
11121147
/**
11131148
* <p>A structure that includes the entry point from which the canary should start
11141149
* running your script. If the script is stored in
1115-
* an S3 bucket, the bucket name, key, and version are also included.
1150+
* an Amazon S3 bucket, the bucket name, key, and version are also included.
11161151
* </p>
11171152
* @public
11181153
*/
@@ -1121,7 +1156,7 @@ export interface CreateCanaryRequest {
11211156
/**
11221157
* <p>The location in Amazon S3 where Synthetics stores artifacts from the test runs of this
11231158
* canary. Artifacts include the log file, screenshots, and HAR files. The name of the
1124-
* S3 bucket can't include a period (.).</p>
1159+
* Amazon S3 bucket can't include a period (.).</p>
11251160
* @public
11261161
*/
11271162
ArtifactS3Location: string | undefined;
@@ -2080,7 +2115,7 @@ export interface StartCanaryDryRunRequest {
20802115
/**
20812116
* <p>Use this structure to input your script code for the canary. This structure contains the
20822117
* Lambda handler with the location where the canary should start running the script. If the
2083-
* script is stored in an S3 bucket, the bucket name, key, and version are also included. If
2118+
* script is stored in an Amazon S3 bucket, the bucket name, key, and version are also included. If
20842119
* the script was passed into the canary directly, the script code is contained in the value
20852120
* of <code>Zipfile</code>. </p>
20862121
* <p>If you are uploading your canary scripts with an Amazon S3 bucket, your zip file should include your
@@ -2137,7 +2172,8 @@ export interface StartCanaryDryRunRequest {
21372172
ExecutionRoleArn?: string | undefined;
21382173

21392174
/**
2140-
* <p>The number of days to retain data on the failed runs for this canary. The valid range is 1 to 455 days.</p>
2175+
* <p>The number of days to retain data about successful runs of this canary. If you omit
2176+
* this field, the default of 31 days is used. The valid range is 1 to 455 days.</p>
21412177
* <p>This setting affects the range of information returned by <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanaryRuns.html">GetCanaryRuns</a>, as well as
21422178
* the range of information displayed in the Synthetics console.
21432179
* </p>
@@ -2146,7 +2182,8 @@ export interface StartCanaryDryRunRequest {
21462182
SuccessRetentionPeriodInDays?: number | undefined;
21472183

21482184
/**
2149-
* <p>The number of days to retain data on the failed runs for this canary. The valid range is 1 to 455 days.</p>
2185+
* <p>The number of days to retain data about failed runs of this canary. If you omit
2186+
* this field, the default of 31 days is used. The valid range is 1 to 455 days.</p>
21502187
* <p>This setting affects the range of information returned by <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_GetCanaryRuns.html">GetCanaryRuns</a>, as well as
21512188
* the range of information displayed in the Synthetics console.
21522189
* </p>
@@ -2168,6 +2205,7 @@ export interface StartCanaryDryRunRequest {
21682205

21692206
/**
21702207
* <p>The location in Amazon S3 where Synthetics stores artifacts from the test runs of this
2208+
*
21712209
* canary. Artifacts include the log file, screenshots, and HAR files. The name of the
21722210
* Amazon S3 bucket can't include a period (.).</p>
21732211
* @public
@@ -2183,7 +2221,8 @@ export interface StartCanaryDryRunRequest {
21832221

21842222
/**
21852223
* <p>Specifies whether to also delete the Lambda functions and layers used by this canary
2186-
* when the canary is deleted. If the value of this parameter is <code>AUTOMATIC</code>, it means
2224+
* when the canary is deleted. If you omit this parameter, the default of <code>AUTOMATIC</code> is used, which means
2225+
*
21872226
* that the Lambda functions and layers will be deleted when the canary is deleted.</p>
21882227
* <p>If the value of this parameter is <code>OFF</code>, then the value of the <code>DeleteLambda</code> parameter
21892228
* of the <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_DeleteCanary.html">DeleteCanary</a> operation
@@ -2294,7 +2333,7 @@ export interface UpdateCanaryRequest {
22942333
/**
22952334
* <p>A structure that includes the entry point from which the canary should start
22962335
* running your script. If the script is stored in
2297-
* an S3 bucket, the bucket name, key, and version are also included.
2336+
* an Amazon S3 bucket, the bucket name, key, and version are also included.
22982337
* </p>
22992338
* @public
23002339
*/
@@ -2415,7 +2454,7 @@ export interface UpdateCanaryRequest {
24152454
/**
24162455
* <p>The location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary.
24172456
* Artifacts include the log file, screenshots, and HAR files. The name of the
2418-
* S3 bucket can't include a period (.).</p>
2457+
* Amazon S3 bucket can't include a period (.).</p>
24192458
* @public
24202459
*/
24212460
ArtifactS3Location?: string | undefined;

0 commit comments

Comments
 (0)