/AWS1/IF_SYN=>UPDATECANARY()¶
About UpdateCanary¶
Updates the configuration of a canary that has already been created.
For multibrowser canaries, you can add or remove browsers by updating the browserConfig list in the update call. For example:
-
To add Firefox to a canary that currently uses Chrome, specify browserConfigs as [CHROME, FIREFOX]
-
To remove Firefox and keep only Chrome, specify browserConfigs as [CHROME]
You can't use this operation to update the tags of an existing canary. To change the tags of an existing canary, use TagResource.
When you use the dryRunId field when updating a canary, the only other field you can provide is the Schedule. Adding any other field will thrown an exception.
Method Signature¶
METHODS /AWS1/IF_SYN~UPDATECANARY
IMPORTING
!IV_NAME TYPE /AWS1/SYNCANARYNAME OPTIONAL
!IO_CODE TYPE REF TO /AWS1/CL_SYNCANARYCODEINPUT OPTIONAL
!IV_EXECUTIONROLEARN TYPE /AWS1/SYNROLEARN OPTIONAL
!IV_RUNTIMEVERSION TYPE /AWS1/SYNSTRING OPTIONAL
!IO_SCHEDULE TYPE REF TO /AWS1/CL_SYNCANARYSCHDINPUT OPTIONAL
!IO_RUNCONFIG TYPE REF TO /AWS1/CL_SYNCANARYRUNCFGINPUT OPTIONAL
!IV_SUCCESSRETPERIODINDAYS TYPE /AWS1/SYNMAXSIZE1024 OPTIONAL
!IV_FAILURERETPERIODINDAYS TYPE /AWS1/SYNMAXSIZE1024 OPTIONAL
!IO_VPCCONFIG TYPE REF TO /AWS1/CL_SYNVPCCONFIGINPUT OPTIONAL
!IO_VISUALREFERENCE TYPE REF TO /AWS1/CL_SYNVISUALREFERENCEINP OPTIONAL
!IV_ARTIFACTS3LOCATION TYPE /AWS1/SYNSTRING OPTIONAL
!IO_ARTIFACTCONFIG TYPE REF TO /AWS1/CL_SYNARTIFACTCFGINPUT OPTIONAL
!IV_PROVRESOURCECLEANUP TYPE /AWS1/SYNPROVRESRCCLEANUPSET00 OPTIONAL
!IV_DRYRUNID TYPE /AWS1/SYNUUID OPTIONAL
!IT_VISUALREFERENCES TYPE /AWS1/CL_SYNVISUALREFERENCEINP=>TT_VISUALREFERENCES OPTIONAL
!IT_BROWSERCONFIGS TYPE /AWS1/CL_SYNBROWSERCONFIG=>TT_BROWSERCONFIGS OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_synupdatecanaryrsp
RAISING
/AWS1/CX_SYNACCESSDENIEDEX
/AWS1/CX_SYNCONFLICTEXCEPTION
/AWS1/CX_SYNINTERNALSERVEREX
/AWS1/CX_SYNREQENTTOOLARGEEX
/AWS1/CX_SYNRESOURCENOTFOUNDEX
/AWS1/CX_SYNVALIDATIONEX
/AWS1/CX_SYNCLIENTEXC
/AWS1/CX_SYNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_name TYPE /AWS1/SYNCANARYNAME /AWS1/SYNCANARYNAME¶
The name of the canary that you want to update. To find the names of your canaries, use DescribeCanaries.
You cannot change the name of a canary that has already been created.
Optional arguments:¶
io_code TYPE REF TO /AWS1/CL_SYNCANARYCODEINPUT /AWS1/CL_SYNCANARYCODEINPUT¶
A structure that includes the entry point from which the canary should start running your script. If the script is stored in an Amazon S3 bucket, the bucket name, key, and version are also included.
iv_executionrolearn TYPE /AWS1/SYNROLEARN /AWS1/SYNROLEARN¶
The ARN of the IAM role to be used to run the canary. This role must already exist, and must include
lambda.amazonaws.com.rproxy.goskope.comas a principal in the trust policy. The role must also have the following permissions:
s3:PutObject
s3:GetBucketLocation
s3:ListAllMyBuckets
cloudwatch:PutMetricData
logs:CreateLogGroup
logs:CreateLogStream
logs:CreateLogStream
iv_runtimeversion TYPE /AWS1/SYNSTRING /AWS1/SYNSTRING¶
Specifies the runtime version to use for the canary.
For a list of valid runtime versions and for more information about runtime versions, see Canary Runtime Versions.
io_schedule TYPE REF TO /AWS1/CL_SYNCANARYSCHDINPUT /AWS1/CL_SYNCANARYSCHDINPUT¶
A structure that contains information about how often the canary is to run, and when these runs are to stop.
io_runconfig TYPE REF TO /AWS1/CL_SYNCANARYRUNCFGINPUT /AWS1/CL_SYNCANARYRUNCFGINPUT¶
A structure that contains the timeout value that is used for each individual run of the canary.
Environment variable keys and values are encrypted at rest using Amazon Web Services owned KMS keys. However, the environment variables are not encrypted on the client side. Do not store sensitive information in them.
iv_successretperiodindays TYPE /AWS1/SYNMAXSIZE1024 /AWS1/SYNMAXSIZE1024¶
The number of days to retain data about successful runs of this canary.
This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console.
iv_failureretperiodindays TYPE /AWS1/SYNMAXSIZE1024 /AWS1/SYNMAXSIZE1024¶
The number of days to retain data about failed runs of this canary.
This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console.
io_vpcconfig TYPE REF TO /AWS1/CL_SYNVPCCONFIGINPUT /AWS1/CL_SYNVPCCONFIGINPUT¶
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.
io_visualreference TYPE REF TO /AWS1/CL_SYNVISUALREFERENCEINP /AWS1/CL_SYNVISUALREFERENCEINP¶
Defines the screenshots to use as the baseline for comparisons during visual monitoring comparisons during future runs of this canary. If you omit this parameter, no changes are made to any baseline screenshots that the canary might be using already.
Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 runtime or later. For more information, see Visual monitoring and Visual monitoring blueprint
iv_artifacts3location TYPE /AWS1/SYNSTRING /AWS1/SYNSTRING¶
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 Amazon S3 bucket can't include a period (.).
io_artifactconfig TYPE REF TO /AWS1/CL_SYNARTIFACTCFGINPUT /AWS1/CL_SYNARTIFACTCFGINPUT¶
A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.
iv_provresourcecleanup TYPE /AWS1/SYNPROVRESRCCLEANUPSET00 /AWS1/SYNPROVRESRCCLEANUPSET00¶
Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted.
If the value of this parameter is
OFF, then the value of theDeleteLambdaparameter of the DeleteCanary operation determines whether the Lambda functions and layers will be deleted.
iv_dryrunid TYPE /AWS1/SYNUUID /AWS1/SYNUUID¶
Update the existing canary using the updated configurations from the DryRun associated with the DryRunId.
When you use the
dryRunIdfield when updating a canary, the only other field you can provide is theSchedule. Adding any other field will thrown an exception.
it_visualreferences TYPE /AWS1/CL_SYNVISUALREFERENCEINP=>TT_VISUALREFERENCES TT_VISUALREFERENCES¶
A list of visual reference configurations for the canary, one for each browser type that the canary is configured to run on. Visual references are used for visual monitoring comparisons.
syn-nodejs-puppeteer-11.0and above, andsyn-nodejs-playwright-3.0and above, only supportsvisualReferences.visualReferencefield is not supported.Versions older than
syn-nodejs-puppeteer-11.0supports bothvisualReferenceandvisualReferencesfor backward compatibility. It is recommended to usevisualReferencesfor consistency and future compatibility.For multibrowser visual monitoring, you can update the baseline for all configured browsers in a single update call by specifying a list of VisualReference objects, one per browser. Each VisualReference object maps to a specific browser configuration, allowing you to manage visual baselines for multiple browsers simultaneously.
For single configuration canaries using Chrome browser (default browser), use visualReferences for
syn-nodejs-puppeteer-11.0and above, andsyn-nodejs-playwright-3.0and above canaries. The browserType in the visualReference object is not mandatory.
it_browserconfigs TYPE /AWS1/CL_SYNBROWSERCONFIG=>TT_BROWSERCONFIGS TT_BROWSERCONFIGS¶
A structure that specifies the browser type to use for a canary run. CloudWatch Synthetics supports running canaries on both
CHROMEandFIREFOXbrowsers.If not specified,
browserConfigsdefaults to Chrome.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_synupdatecanaryrsp /AWS1/CL_SYNUPDATECANARYRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->updatecanary(
io_artifactconfig = new /aws1/cl_synartifactcfginput(
io_s3encryption = new /aws1/cl_syns3encryptionconfig(
iv_encryptionmode = |string|
iv_kmskeyarn = |string|
)
)
io_code = new /aws1/cl_syncanarycodeinput(
it_blueprinttypes = VALUE /aws1/cl_synblueprinttypes_w=>tt_blueprinttypes(
( new /aws1/cl_synblueprinttypes_w( |string| ) )
)
it_dependencies = VALUE /aws1/cl_syndependency=>tt_dependencies(
(
new /aws1/cl_syndependency(
iv_reference = |string|
iv_type = |string|
)
)
)
iv_handler = |string|
iv_s3bucket = |string|
iv_s3key = |string|
iv_s3version = |string|
iv_zipfile = '5347567362473873563239796247513D'
)
io_runconfig = new /aws1/cl_syncanaryruncfginput(
it_environmentvariables = VALUE /aws1/cl_synenvironmentvaria00=>tt_environmentvariablesmap(
(
VALUE /aws1/cl_synenvironmentvaria00=>ts_environmentvariabl00_maprow(
key = |string|
value = new /aws1/cl_synenvironmentvaria00( |string| )
)
)
)
iv_activetracing = ABAP_TRUE
iv_ephemeralstorage = 123
iv_memoryinmb = 123
iv_timeoutinseconds = 123
)
io_schedule = new /aws1/cl_syncanaryschdinput(
io_retryconfig = new /aws1/cl_synretryconfiginput( 123 )
iv_durationinseconds = 123
iv_expression = |string|
)
io_visualreference = new /aws1/cl_synvisualreferenceinp(
it_basescreenshots = VALUE /aws1/cl_synbasescreenshot=>tt_basescreenshots(
(
new /aws1/cl_synbasescreenshot(
it_ignorecoordinates = VALUE /aws1/cl_synbasescreenshotig00=>tt_basescreenshotignorecoord00(
( new /aws1/cl_synbasescreenshotig00( |string| ) )
)
iv_screenshotname = |string|
)
)
)
iv_basecanaryrunid = |string|
iv_browsertype = |string|
)
io_vpcconfig = new /aws1/cl_synvpcconfiginput(
it_securitygroupids = VALUE /aws1/cl_synsecuritygroupids_w=>tt_securitygroupids(
( new /aws1/cl_synsecuritygroupids_w( |string| ) )
)
it_subnetids = VALUE /aws1/cl_synsubnetids_w=>tt_subnetids(
( new /aws1/cl_synsubnetids_w( |string| ) )
)
iv_ipv6allowedfordualstack = ABAP_TRUE
)
it_browserconfigs = VALUE /aws1/cl_synbrowserconfig=>tt_browserconfigs(
( new /aws1/cl_synbrowserconfig( |string| ) )
)
it_visualreferences = VALUE /aws1/cl_synvisualreferenceinp=>tt_visualreferences(
(
new /aws1/cl_synvisualreferenceinp(
it_basescreenshots = VALUE /aws1/cl_synbasescreenshot=>tt_basescreenshots(
(
new /aws1/cl_synbasescreenshot(
it_ignorecoordinates = VALUE /aws1/cl_synbasescreenshotig00=>tt_basescreenshotignorecoord00(
( new /aws1/cl_synbasescreenshotig00( |string| ) )
)
iv_screenshotname = |string|
)
)
)
iv_basecanaryrunid = |string|
iv_browsertype = |string|
)
)
)
iv_artifacts3location = |string|
iv_dryrunid = |string|
iv_executionrolearn = |string|
iv_failureretperiodindays = 123
iv_name = |string|
iv_provresourcecleanup = |string|
iv_runtimeversion = |string|
iv_successretperiodindays = 123
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.