Skip to content

Commit ce5dba3

Browse files
Add support to change ephemeral storage. Add a new field "TestResult" under CanaryRunStatus.
1 parent 6031b19 commit ce5dba3

15 files changed

+273
-54
lines changed

generator/ServiceModels/synthetics/synthetics-2017-10-11.api.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -509,15 +509,17 @@
509509
"TimeoutInSeconds":{"shape":"MaxFifteenMinutesInSeconds"},
510510
"MemoryInMB":{"shape":"MaxSize3008"},
511511
"ActiveTracing":{"shape":"NullableBoolean"},
512-
"EnvironmentVariables":{"shape":"EnvironmentVariablesMap"}
512+
"EnvironmentVariables":{"shape":"EnvironmentVariablesMap"},
513+
"EphemeralStorage":{"shape":"EphemeralStorageSize"}
513514
}
514515
},
515516
"CanaryRunConfigOutput":{
516517
"type":"structure",
517518
"members":{
518519
"TimeoutInSeconds":{"shape":"MaxFifteenMinutesInSeconds"},
519520
"MemoryInMB":{"shape":"MaxSize3008"},
520-
"ActiveTracing":{"shape":"NullableBoolean"}
521+
"ActiveTracing":{"shape":"NullableBoolean"},
522+
"EphemeralStorage":{"shape":"EphemeralStorageSize"}
521523
}
522524
},
523525
"CanaryRunState":{
@@ -540,9 +542,18 @@
540542
"members":{
541543
"State":{"shape":"CanaryRunState"},
542544
"StateReason":{"shape":"String"},
543-
"StateReasonCode":{"shape":"CanaryRunStateReasonCode"}
545+
"StateReasonCode":{"shape":"CanaryRunStateReasonCode"},
546+
"TestResult":{"shape":"CanaryRunTestResult"}
544547
}
545548
},
549+
"CanaryRunTestResult":{
550+
"type":"string",
551+
"enum":[
552+
"PASSED",
553+
"FAILED",
554+
"UNKNOWN"
555+
]
556+
},
546557
"CanaryRunTimeline":{
547558
"type":"structure",
548559
"members":{
@@ -815,6 +826,11 @@
815826
"key":{"shape":"EnvironmentVariableName"},
816827
"value":{"shape":"EnvironmentVariableValue"}
817828
},
829+
"EphemeralStorageSize":{
830+
"type":"integer",
831+
"max":5120,
832+
"min":1024
833+
},
818834
"ErrorMessage":{"type":"string"},
819835
"FunctionArn":{
820836
"type":"string",

generator/ServiceModels/synthetics/synthetics-2017-10-11.docs.json

Lines changed: 26 additions & 13 deletions
Large diffs are not rendered by default.

generator/ServiceModels/synthetics/synthetics-2017-10-11.normal.json

Lines changed: 38 additions & 13 deletions
Large diffs are not rendered by default.

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,11 @@
431431
<property>Amazon.Synthetics.Model.CanaryRun.ScheduledRunId</property>
432432
<pattern>^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$</pattern>
433433
</property-value-rule>
434+
<property-value-rule>
435+
<property>Amazon.Synthetics.Model.CanaryRunConfigInput.EphemeralStorage</property>
436+
<min>1024</min>
437+
<max>5120</max>
438+
</property-value-rule>
434439
<property-value-rule>
435440
<property>Amazon.Synthetics.Model.CanaryRunConfigInput.MemoryInMB</property>
436441
<min>960</min>
@@ -441,6 +446,11 @@
441446
<min>3</min>
442447
<max>840</max>
443448
</property-value-rule>
449+
<property-value-rule>
450+
<property>Amazon.Synthetics.Model.CanaryRunConfigOutput.EphemeralStorage</property>
451+
<min>1024</min>
452+
<max>5120</max>
453+
</property-value-rule>
444454
<property-value-rule>
445455
<property>Amazon.Synthetics.Model.CanaryRunConfigOutput.MemoryInMB</property>
446456
<min>960</min>

sdk/src/Services/Synthetics/Generated/Model/CanaryCodeInput.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ namespace Amazon.Synthetics.Model
3232
/// <summary>
3333
/// Use this structure to input your script code for the canary. This structure contains
3434
/// the Lambda handler with the location where the canary should start running the script.
35-
/// If the script is stored in an S3 bucket, the bucket name, key, and version are also
36-
/// included. If the script was passed into the canary directly, the script code is contained
37-
/// in the value of <c>Zipfile</c>.
35+
/// If the script is stored in an Amazon S3 bucket, the bucket name, key, and version
36+
/// are also included. If the script was passed into the canary directly, the script code
37+
/// is contained in the value of <c>Zipfile</c>.
3838
///
3939
///
4040
/// <para>
@@ -92,8 +92,8 @@ internal bool IsSetHandler()
9292
/// <summary>
9393
/// Gets and sets the property S3Bucket.
9494
/// <para>
95-
/// If your canary script is located in S3, specify the bucket name here. Do not include
96-
/// <c>s3://</c> as the start of the bucket name.
95+
/// If your canary script is located in Amazon S3, specify the bucket name here. Do not
96+
/// include <c>s3://</c> as the start of the bucket name.
9797
/// </para>
9898
/// </summary>
9999
[AWSProperty(Min=1, Max=1024)]
@@ -112,7 +112,7 @@ internal bool IsSetS3Bucket()
112112
/// <summary>
113113
/// Gets and sets the property S3Key.
114114
/// <para>
115-
/// The S3 key of your script. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html">Working
115+
/// The Amazon S3 key of your script. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingObjects.html">Working
116116
/// with Amazon S3 Objects</a>.
117117
/// </para>
118118
/// </summary>
@@ -132,7 +132,7 @@ internal bool IsSetS3Key()
132132
/// <summary>
133133
/// Gets and sets the property S3Version.
134134
/// <para>
135-
/// The S3 version ID of your script.
135+
/// The Amazon S3 version ID of your script.
136136
/// </para>
137137
/// </summary>
138138
[AWSProperty(Min=1, Max=1024)]
@@ -152,13 +152,13 @@ internal bool IsSetS3Version()
152152
/// Gets and sets the property ZipFile.
153153
/// <para>
154154
/// If you input your canary script directly into the canary instead of referring to an
155-
/// S3 location, the value of this parameter is the base64-encoded contents of the .zip
156-
/// file that contains the script. It must be smaller than 225 Kb.
155+
/// Amazon S3 location, the value of this parameter is the base64-encoded contents of
156+
/// the .zip file that contains the script. It must be smaller than 225 Kb.
157157
/// </para>
158158
///
159159
/// <para>
160-
/// For large canary scripts, we recommend that you use an S3 location instead of inputting
161-
/// it directly with this parameter.
160+
/// For large canary scripts, we recommend that you use an Amazon S3 location instead
161+
/// of inputting it directly with this parameter.
162162
/// </para>
163163
/// </summary>
164164
[AWSProperty(Min=1, Max=10000000)]

sdk/src/Services/Synthetics/Generated/Model/CanaryRunConfigInput.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public partial class CanaryRunConfigInput
3636
{
3737
private bool? _activeTracing;
3838
private Dictionary<string, string> _environmentVariables = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
39+
private int? _ephemeralStorage;
3940
private int? _memoryInMB;
4041
private int? _timeoutInSeconds;
4142

@@ -104,6 +105,29 @@ internal bool IsSetEnvironmentVariables()
104105
return this._environmentVariables != null && (this._environmentVariables.Count > 0 || !AWSConfigs.InitializeCollections);
105106
}
106107

108+
/// <summary>
109+
/// Gets and sets the property EphemeralStorage.
110+
/// <para>
111+
/// Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during
112+
/// execution. This temporary storage is used for storing canary run artifacts (which
113+
/// are uploaded to an Amazon S3 bucket at the end of the run), and any canary browser
114+
/// operations. This temporary storage is cleared after the run is completed. Default
115+
/// storage value is 1024 MB.
116+
/// </para>
117+
/// </summary>
118+
[AWSProperty(Min=1024, Max=5120)]
119+
public int EphemeralStorage
120+
{
121+
get { return this._ephemeralStorage.GetValueOrDefault(); }
122+
set { this._ephemeralStorage = value; }
123+
}
124+
125+
// Check to see if EphemeralStorage property is set
126+
internal bool IsSetEphemeralStorage()
127+
{
128+
return this._ephemeralStorage.HasValue;
129+
}
130+
107131
/// <summary>
108132
/// Gets and sets the property MemoryInMB.
109133
/// <para>

sdk/src/Services/Synthetics/Generated/Model/CanaryRunConfigOutput.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ namespace Amazon.Synthetics.Model
3535
public partial class CanaryRunConfigOutput
3636
{
3737
private bool? _activeTracing;
38+
private int? _ephemeralStorage;
3839
private int? _memoryInMB;
3940
private int? _timeoutInSeconds;
4041

@@ -56,6 +57,29 @@ internal bool IsSetActiveTracing()
5657
return this._activeTracing.HasValue;
5758
}
5859

60+
/// <summary>
61+
/// Gets and sets the property EphemeralStorage.
62+
/// <para>
63+
/// Specifies the amount of ephemeral storage (in MB) to allocate for the canary run during
64+
/// execution. This temporary storage is used for storing canary run artifacts (which
65+
/// are uploaded to an Amazon S3 bucket at the end of the run), and any canary browser
66+
/// operations. This temporary storage is cleared after the run is completed. Default
67+
/// storage value is 1024 MB.
68+
/// </para>
69+
/// </summary>
70+
[AWSProperty(Min=1024, Max=5120)]
71+
public int EphemeralStorage
72+
{
73+
get { return this._ephemeralStorage.GetValueOrDefault(); }
74+
set { this._ephemeralStorage = value; }
75+
}
76+
77+
// Check to see if EphemeralStorage property is set
78+
internal bool IsSetEphemeralStorage()
79+
{
80+
return this._ephemeralStorage.HasValue;
81+
}
82+
5983
/// <summary>
6084
/// Gets and sets the property MemoryInMB.
6185
/// <para>

sdk/src/Services/Synthetics/Generated/Model/CanaryRunStatus.cs

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public partial class CanaryRunStatus
3737
private CanaryRunState _state;
3838
private string _stateReason;
3939
private CanaryRunStateReasonCode _stateReasonCode;
40+
private CanaryRunTestResult _testResult;
4041

4142
/// <summary>
4243
/// Gets and sets the property State.
@@ -78,8 +79,21 @@ internal bool IsSetStateReason()
7879
/// <summary>
7980
/// Gets and sets the property StateReasonCode.
8081
/// <para>
81-
/// If this value is <c>CANARY_FAILURE</c>, an exception occurred in the canary code.
82-
/// If this value is <c>EXECUTION_FAILURE</c>, an exception occurred in CloudWatch Synthetics.
82+
/// If this value is <c>CANARY_FAILURE</c>, either the canary script failed or Synthetics
83+
/// ran into a fatal error when running the canary. For example, a canary timeout misconfiguration
84+
/// setting can cause the canary to timeout before Synthetics can evaluate its status.
85+
///
86+
/// </para>
87+
///
88+
/// <para>
89+
/// If this value is <c>EXECUTION_FAILURE</c>, a non-critical failure occurred such as
90+
/// failing to save generated debug artifacts (for example, screenshots or har files).
91+
/// </para>
92+
///
93+
/// <para>
94+
/// If both types of failures occurred, the <c>CANARY_FAILURE</c> takes precedence. To
95+
/// understand the exact error, use the <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRunStatus.html">StateReason</a>
96+
/// API.
8397
/// </para>
8498
/// </summary>
8599
public CanaryRunStateReasonCode StateReasonCode
@@ -94,5 +108,25 @@ internal bool IsSetStateReasonCode()
94108
return this._stateReasonCode != null;
95109
}
96110

111+
/// <summary>
112+
/// Gets and sets the property TestResult.
113+
/// <para>
114+
/// Specifies the status of canary script for this run. When Synthetics tries to determine
115+
/// the status but fails, the result is marked as <c>UNKNOWN</c>. For the overall status
116+
/// of canary run, see <a href="https://docs.aws.amazon.com/AmazonSynthetics/latest/APIReference/API_CanaryRunStatus.html">State</a>.
117+
/// </para>
118+
/// </summary>
119+
public CanaryRunTestResult TestResult
120+
{
121+
get { return this._testResult; }
122+
set { this._testResult = value; }
123+
}
124+
125+
// Check to see if TestResult property is set
126+
internal bool IsSetTestResult()
127+
{
128+
return this._testResult != null;
129+
}
130+
97131
}
98132
}

sdk/src/Services/Synthetics/Generated/Model/CreateCanaryRequest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ internal bool IsSetArtifactConfig()
9898
/// <para>
9999
/// The location in Amazon S3 where Synthetics stores artifacts from the test runs of
100100
/// this canary. Artifacts include the log file, screenshots, and HAR files. The name
101-
/// of the S3 bucket can't include a period (.).
101+
/// of the Amazon S3 bucket can't include a period (.).
102102
/// </para>
103103
/// </summary>
104104
[AWSProperty(Required=true, Min=1, Max=1024)]
@@ -118,8 +118,8 @@ internal bool IsSetArtifactS3Location()
118118
/// Gets and sets the property Code.
119119
/// <para>
120120
/// A structure that includes the entry point from which the canary should start running
121-
/// your script. If the script is stored in an S3 bucket, the bucket name, key, and version
122-
/// are also included.
121+
/// your script. If the script is stored in an Amazon S3 bucket, the bucket name, key,
122+
/// and version are also included.
123123
/// </para>
124124
/// </summary>
125125
[AWSProperty(Required=true)]

sdk/src/Services/Synthetics/Generated/Model/Internal/MarshallTransformations/CanaryRunConfigInputMarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ public void Marshall(CanaryRunConfigInput requestObject, JsonMarshallerContext c
6868
context.Writer.WriteObjectEnd();
6969
}
7070

71+
if(requestObject.IsSetEphemeralStorage())
72+
{
73+
context.Writer.WritePropertyName("EphemeralStorage");
74+
context.Writer.Write(requestObject.EphemeralStorage);
75+
}
76+
7177
if(requestObject.IsSetMemoryInMB())
7278
{
7379
context.Writer.WritePropertyName("MemoryInMB");

0 commit comments

Comments
 (0)