diff --git a/.changes/next-release/feature-Synthetics-8cfef48.json b/.changes/next-release/feature-Synthetics-8cfef48.json new file mode 100644 index 000000000000..84cbf67cd9d3 --- /dev/null +++ b/.changes/next-release/feature-Synthetics-8cfef48.json @@ -0,0 +1,6 @@ +{ + "type": "feature", + "category": "Synthetics", + "contributor": "", + "description": "CloudWatch Synthetics now supports visual testing in its canaries." +} diff --git a/services/synthetics/src/main/resources/codegen-resources/service-2.json b/services/synthetics/src/main/resources/codegen-resources/service-2.json index 255bc9bba01d..90fb31bf695f 100644 --- a/services/synthetics/src/main/resources/codegen-resources/service-2.json +++ b/services/synthetics/src/main/resources/codegen-resources/service-2.json @@ -174,7 +174,7 @@ {"shape":"ResourceNotFoundException"}, {"shape":"ValidationException"} ], - "documentation":"
Assigns one or more tags (key-value pairs) to the specified canary.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values.
Tags don't have any semantic meaning to AWS and are interpreted strictly as strings of characters.
You can use the TagResource
action with a canary that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.
You can associate as many as 50 tags with a canary.
" + "documentation":"Assigns one or more tags (key-value pairs) to the specified canary.
Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values.
Tags don't have any semantic meaning to Amazon Web Services and are interpreted strictly as strings of characters.
You can use the TagResource
action with a canary that already has tags. If you specify a new tag key for the alarm, this tag is appended to the list of tags associated with the alarm. If you specify a tag key that is already associated with the alarm, the new tag value that you specify replaces the previous value for that tag.
You can associate as many as 50 tags with a canary.
" }, "UntagResource":{ "name":"UntagResource", @@ -209,6 +209,28 @@ } }, "shapes":{ + "BaseScreenshot":{ + "type":"structure", + "required":["ScreenshotName"], + "members":{ + "ScreenshotName":{"shape":"String"}, + "IgnoreCoordinates":{"shape":"BaseScreenshotIgnoreCoordinates"} + } + }, + "BaseScreenshotConfigIgnoreCoordinate":{ + "type":"string", + "pattern":"^(-?\\d{1,5}\\.?\\d{0,2},){3}(-?\\d{1,5}\\.?\\d{0,2}){1}$" + }, + "BaseScreenshotIgnoreCoordinates":{ + "type":"list", + "member":{"shape":"BaseScreenshotConfigIgnoreCoordinate"}, + "max":20, + "min":0 + }, + "BaseScreenshots":{ + "type":"list", + "member":{"shape":"BaseScreenshot"} + }, "Blob":{ "type":"blob", "max":10000000, @@ -272,6 +294,7 @@ "documentation":"Specifies the runtime version to use for the canary. For more information about runtime versions, see Canary Runtime Versions.
" }, "VpcConfig":{"shape":"VpcConfigOutput"}, + "VisualReference":{"shape":"VisualReferenceOutput"}, "Tags":{ "shape":"TagMap", "documentation":"The list of key-value pairs that are associated with the canary.
" @@ -291,7 +314,7 @@ "members":{ "S3Bucket":{ "shape":"String", - "documentation":"If your canary script is located in S3, specify the full bucket name here. The bucket must already exist. Specify the full bucket name, including s3://
as the start of the bucket name.
If your canary script is located in S3, specify the bucket name here. Do not include s3://
as the start of the bucket name.
If you input your canary script directly into the canary instead of referring to an S3 location, the value of this parameter is the .zip file that contains the script. It can be up to 5 MB.
" + "documentation":"If you input your canary script directly into the canary instead of referring to an S3 location, the value of this parameter is the base64-encoded contents of the .zip file that contains the script. It can be up to 5 MB.
" }, "Handler":{ "shape":"String", - "documentation":"The entry point to use for the source code when running the canary. This value must end with the string .handler
.
The entry point to use for the source code when running the canary. This value must end with the string .handler
. The string is limited to 29 characters or fewer.
Use this structure to input your script code for the canary. This structure contains the Lambda handler with the location where the canary should start running the script. If the script is stored in an S3 bucket, the bucket name, key, and version are also included. If the script was passed into the canary directly, the script code is contained in the value of Zipfile
.
Specifies whether this canary is to use active AWS X-Ray tracing when it runs. Active tracing enables this canary run to be displayed in the ServiceLens and X-Ray service maps even if the canary does not hit an endpoint that has X-ray tracing enabled. Using X-Ray tracing incurs charges. For more information, see Canaries and X-Ray tracing.
You can enable active tracing only for canaries that use version syn-nodejs-2.0
or later for their canary runtime.
Specifies whether this canary is to use active X-Ray tracing when it runs. Active tracing enables this canary run to be displayed in the ServiceLens and X-Ray service maps even if the canary does not hit an endpoint that has X-Ray tracing enabled. Using X-Ray tracing incurs charges. For more information, see Canaries and X-Ray tracing.
You can enable active tracing only for canaries that use version syn-nodejs-2.0
or later for their canary runtime.
Displays whether this canary run used active AWS X-Ray tracing.
" + "documentation":"Displays whether this canary run used active X-Ray tracing.
" } }, "documentation":"A structure that contains information about a canary run.
" @@ -469,7 +492,7 @@ "members":{ "Expression":{ "shape":"String", - "documentation":"A rate expression that defines how often the canary is to run. The syntax is rate(number unit)
. unit can be minute
, minutes
, or hour
.
For example, rate(1 minute)
runs the canary once a minute, rate(10 minutes)
runs it once every 10 minutes, and rate(1 hour)
runs it once every hour. You can specify a frequency between rate(1 minute)
and rate(1 hour)
.
Specifying rate(0 minute)
or rate(0 hour)
is a special value that causes the canary to run only once when it is started.
A rate
expression or a cron
expression that defines how often the canary is to run.
For a rate expression, The syntax is rate(number unit)
. unit can be minute
, minutes
, or hour
.
For example, rate(1 minute)
runs the canary once a minute, rate(10 minutes)
runs it once every 10 minutes, and rate(1 hour)
runs it once every hour. You can specify a frequency between rate(1 minute)
and rate(1 hour)
.
Specifying rate(0 minute)
or rate(0 hour)
is a special value that causes the canary to run only once when it is started.
Use cron(expression)
to specify a cron expression. You can't schedule a canary to wait for more than a year before running. For information about the syntax for cron expressions, see Scheduling canary runs using cron.
A rate expression that defines how often the canary is to run. The syntax is rate(number unit)
. unit can be minute
, minutes
, or hour
.
For example, rate(1 minute)
runs the canary once a minute, rate(10 minutes)
runs it once every 10 minutes, and rate(1 hour)
runs it once every hour.
Specifying rate(0 minute)
or rate(0 hour)
is a special value that causes the canary to run only once when it is started.
A rate
expression or a cron
expression that defines how often the canary is to run.
For a rate expression, The syntax is rate(number unit)
. unit can be minute
, minutes
, or hour
.
For example, rate(1 minute)
runs the canary once a minute, rate(10 minutes)
runs it once every 10 minutes, and rate(1 hour)
runs it once every hour. You can specify a frequency between rate(1 minute)
and rate(1 hour)
.
Specifying rate(0 minute)
or rate(0 hour)
is a special value that causes the canary to run only once when it is started.
Use cron(expression)
to specify a cron expression. For information about the syntax for cron expressions, see Scheduling canary runs using cron.
The location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary. Artifacts include the log file, screenshots, and HAR files.
" + "documentation":"The location in Amazon S3 where Synthetics stores artifacts from the test runs of this canary. Artifacts include the log file, screenshots, and HAR files. The name of the S3 bucket can't include a period (.).
" }, "ExecutionRoleArn":{ "shape":"RoleArn", @@ -1070,7 +1093,8 @@ "VpcConfig":{ "shape":"VpcConfigInput", "documentation":"If this canary is to test an endpoint in a VPC, this structure contains information about the subnet and security groups of the VPC endpoint. For more information, see Running a Canary in a VPC.
" - } + }, + "VisualReference":{"shape":"VisualReferenceInput"} } }, "UpdateCanaryResponse":{ @@ -1087,6 +1111,21 @@ "error":{"httpStatusCode":400}, "exception":true }, + "VisualReferenceInput":{ + "type":"structure", + "required":["BaseCanaryRunId"], + "members":{ + "BaseScreenshots":{"shape":"BaseScreenshots"}, + "BaseCanaryRunId":{"shape":"String"} + } + }, + "VisualReferenceOutput":{ + "type":"structure", + "members":{ + "BaseScreenshots":{"shape":"BaseScreenshots"}, + "BaseCanaryRunId":{"shape":"String"} + } + }, "VpcConfigInput":{ "type":"structure", "members":{