Synthetics 2017-10-11
- Client: Aws\Synthetics\SyntheticsClient
- Service ID: synthetics
- Version: 2017-10-11
This page describes the parameters and results for the operations of the Synthetics (2017-10-11), and shows how to use the Aws\Synthetics\SyntheticsClient object to call the described operations. This documentation is specific to the 2017-10-11 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName'), where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */).
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */).
- AssociateResource ( array $params = [] )
- Associates a canary with a group.
- CreateCanary ( array $params = [] )
- Creates a canary.
- CreateGroup ( array $params = [] )
- Creates a group which you can use to associate canaries with each other, including cross-Region canaries.
- DeleteCanary ( array $params = [] )
- Permanently deletes the specified canary.
- DeleteGroup ( array $params = [] )
- Deletes a group.
- DescribeCanaries ( array $params = [] )
- This operation returns a list of the canaries in your account, along with full details about each canary.
- DescribeCanariesLastRun ( array $params = [] )
- Use this operation to see information from the most recent run of each canary that you have created.
- DescribeRuntimeVersions ( array $params = [] )
- Returns a list of Synthetics canary runtime versions.
- DisassociateResource ( array $params = [] )
- Removes a canary from a group.
- GetCanary ( array $params = [] )
- Retrieves complete information about one canary.
- GetCanaryRuns ( array $params = [] )
- Retrieves a list of runs for a specified canary.
- GetGroup ( array $params = [] )
- Returns information about one group.
- ListAssociatedGroups ( array $params = [] )
- Returns a list of the groups that the specified canary is associated with.
- ListGroupResources ( array $params = [] )
- This operation returns a list of the ARNs of the canaries that are associated with the specified group.
- ListGroups ( array $params = [] )
- Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs.
- ListTagsForResource ( array $params = [] )
- Displays the tags associated with a canary or group.
- StartCanary ( array $params = [] )
- Use this operation to run a canary that has already been created.
- StartCanaryDryRun ( array $params = [] )
- Use this operation to start a dry run for a canary that has already been created
- StopCanary ( array $params = [] )
- Stops the canary to prevent all future runs.
- TagResource ( array $params = [] )
- Assigns one or more tags (key-value pairs) to the specified canary or group.
- UntagResource ( array $params = [] )
- Removes one or more tags from the specified resource.
- UpdateCanary ( array $params = [] )
- Updates the configuration of a canary that has already been created.
Paginators
Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:
- DescribeCanaries
- DescribeCanariesLastRun
- DescribeRuntimeVersions
- GetCanaryRuns
- ListAssociatedGroups
- ListGroupResources
- ListGroups
Operations
AssociateResource
$result = $client->associateResource([/* ... */]); $promise = $client->associateResourceAsync([/* ... */]);
Associates a canary with a group. Using groups can help you with managing and automating your canaries, and you can also view aggregated run results and statistics for all canaries in a group.
You must run this operation in the Region where the canary exists.
Parameter Syntax
$result = $client->associateResource([
    'GroupIdentifier' => '<string>', // REQUIRED
    'ResourceArn' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- GroupIdentifier
- 
- Required: Yes
- Type: string
 Specifies the group. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.
- ResourceArn
- 
- Required: Yes
- Type: string
 The ARN of the canary that you want to associate with the specified group. 
Result Syntax
[]
Result Details
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
- ServiceQuotaExceededException:
- The request exceeded a service quota value. 
CreateCanary
$result = $client->createCanary([/* ... */]); $promise = $client->createCanaryAsync([/* ... */]);
Creates a canary. Canaries are scripts that monitor your endpoints and APIs from the outside-in. Canaries help you check the availability and latency of your web services and troubleshoot anomalies by investigating load time data, screenshots of the UI, logs, and metrics. You can set up a canary to run continuously or just once.
Do not use CreateCanary to modify an existing canary. Use UpdateCanary instead.
To create canaries, you must have the CloudWatchSyntheticsFullAccess policy. If you are creating a new IAM role for the canary, you also need the iam:CreateRole, iam:CreatePolicy and iam:AttachRolePolicy permissions. For more information, see Necessary Roles and Permissions.
Do not include secrets or proprietary information in your canary names. The canary name makes up part of the Amazon Resource Name (ARN) for the canary, and the ARN is included in outbound calls over the internet. For more information, see Security Considerations for Synthetics Canaries.
Parameter Syntax
$result = $client->createCanary([
    'ArtifactConfig' => [
        'S3Encryption' => [
            'EncryptionMode' => 'SSE_S3|SSE_KMS',
            'KmsKeyArn' => '<string>',
        ],
    ],
    'ArtifactS3Location' => '<string>', // REQUIRED
    'BrowserConfigs' => [
        [
            'BrowserType' => 'CHROME|FIREFOX',
        ],
        // ...
    ],
    'Code' => [ // REQUIRED
        'BlueprintTypes' => ['<string>', ...],
        'Dependencies' => [
            [
                'Reference' => '<string>', // REQUIRED
                'Type' => 'LambdaLayer',
            ],
            // ...
        ],
        'Handler' => '<string>',
        'S3Bucket' => '<string>',
        'S3Key' => '<string>',
        'S3Version' => '<string>',
        'ZipFile' => <string || resource || Psr\Http\Message\StreamInterface>,
    ],
    'ExecutionRoleArn' => '<string>', // REQUIRED
    'FailureRetentionPeriodInDays' => <integer>,
    'Name' => '<string>', // REQUIRED
    'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF',
    'ResourcesToReplicateTags' => ['<string>', ...],
    'RunConfig' => [
        'ActiveTracing' => true || false,
        'EnvironmentVariables' => ['<string>', ...],
        'EphemeralStorage' => <integer>,
        'MemoryInMB' => <integer>,
        'TimeoutInSeconds' => <integer>,
    ],
    'RuntimeVersion' => '<string>', // REQUIRED
    'Schedule' => [ // REQUIRED
        'DurationInSeconds' => <integer>,
        'Expression' => '<string>', // REQUIRED
        'RetryConfig' => [
            'MaxRetries' => <integer>, // REQUIRED
        ],
    ],
    'SuccessRetentionPeriodInDays' => <integer>,
    'Tags' => ['<string>', ...],
    'VpcConfig' => [
        'Ipv6AllowedForDualStack' => true || false,
        'SecurityGroupIds' => ['<string>', ...],
        'SubnetIds' => ['<string>', ...],
    ],
]);
	Parameter Details
Members
- ArtifactConfig
- 
- Type: ArtifactConfigInput structure
 A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. 
- ArtifactS3Location
- 
- Required: Yes
- Type: string
 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 (.). 
- BrowserConfigs
- 
- Type: Array of BrowserConfig structures
 CloudWatch Synthetics now supports multibrowser canaries for syn-nodejs-puppeteer-11.0andsyn-nodejs-playwright-3.0runtimes. This feature allows you to run your canaries on both Firefox and Chrome browsers. To create a multibrowser canary, you need to specify the BrowserConfigs with a list of browsers you want to use.If not specified, browserConfigsdefaults to Chrome.
- Code
- 
- Required: Yes
- Type: CanaryCodeInput structure
 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. 
- ExecutionRoleArn
- 
- Required: Yes
- Type: string
 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.govskope.caas 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:PutLogEvents
 
- FailureRetentionPeriodInDays
- 
- Type: int
 The number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days. This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console. 
- Name
- 
- Required: Yes
- Type: string
 The name for this canary. Be sure to give it a descriptive name that distinguishes it from other canaries in your account. Do not include secrets or proprietary information in your canary names. The canary name makes up part of the canary ARN, and the ARN is included in outbound calls over the internet. For more information, see Security Considerations for Synthetics Canaries. 
- ProvisionedResourceCleanup
- 
- Type: string
 Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If you omit this parameter, the default of AUTOMATICis used, which means that the Lambda functions and layers will be deleted 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.
- ResourcesToReplicateTags
- 
- Type: Array of strings
 To have the tags that you apply to this canary also be applied to the Lambda function that the canary uses, specify this parameter with the value lambda-function.If you specify this parameter and don't specify any tags in the Tagsparameter, the canary creation fails.
- RunConfig
- 
- Type: CanaryRunConfigInput structure
 A structure that contains the configuration for individual canary runs, such as timeout value and environment variables. 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. 
- RuntimeVersion
- 
- Required: Yes
- Type: string
 Specifies the runtime version to use for the canary. For a list of valid runtime versions and more information about runtime versions, see Canary Runtime Versions. 
- Schedule
- 
- Required: Yes
- Type: CanaryScheduleInput structure
 A structure that contains information about how often the canary is to run and when these test runs are to stop. 
- SuccessRetentionPeriodInDays
- 
- Type: int
 The number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days. This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console. 
- Tags
- 
- Type: Associative array of custom strings keys (TagKey) to strings
 A list of key-value pairs to associate with the canary. You can associate as many as 50 tags with a 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 the resources that have certain tag values. To have the tags that you apply to this canary also be applied to the Lambda function that the canary uses, specify this parameter with the value lambda-function.
- VpcConfig
- 
- Type: VpcConfigInput structure
 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. 
Result Syntax
[
    'Canary' => [
        'ArtifactConfig' => [
            'S3Encryption' => [
                'EncryptionMode' => 'SSE_S3|SSE_KMS',
                'KmsKeyArn' => '<string>',
            ],
        ],
        'ArtifactS3Location' => '<string>',
        'BrowserConfigs' => [
            [
                'BrowserType' => 'CHROME|FIREFOX',
            ],
            // ...
        ],
        'Code' => [
            'BlueprintTypes' => ['<string>', ...],
            'Dependencies' => [
                [
                    'Reference' => '<string>',
                    'Type' => 'LambdaLayer',
                ],
                // ...
            ],
            'Handler' => '<string>',
            'SourceLocationArn' => '<string>',
        ],
        'DryRunConfig' => [
            'DryRunId' => '<string>',
            'LastDryRunExecutionStatus' => '<string>',
        ],
        'EngineArn' => '<string>',
        'EngineConfigs' => [
            [
                'BrowserType' => 'CHROME|FIREFOX',
                'EngineArn' => '<string>',
            ],
            // ...
        ],
        'ExecutionRoleArn' => '<string>',
        'FailureRetentionPeriodInDays' => <integer>,
        'Id' => '<string>',
        'Name' => '<string>',
        'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF',
        'RunConfig' => [
            'ActiveTracing' => true || false,
            'EphemeralStorage' => <integer>,
            'MemoryInMB' => <integer>,
            'TimeoutInSeconds' => <integer>,
        ],
        'RuntimeVersion' => '<string>',
        'Schedule' => [
            'DurationInSeconds' => <integer>,
            'Expression' => '<string>',
            'RetryConfig' => [
                'MaxRetries' => <integer>,
            ],
        ],
        'Status' => [
            'State' => 'CREATING|READY|STARTING|RUNNING|UPDATING|STOPPING|STOPPED|ERROR|DELETING',
            'StateReason' => '<string>',
            'StateReasonCode' => 'INVALID_PERMISSIONS|CREATE_PENDING|CREATE_IN_PROGRESS|CREATE_FAILED|UPDATE_PENDING|UPDATE_IN_PROGRESS|UPDATE_COMPLETE|ROLLBACK_COMPLETE|ROLLBACK_FAILED|DELETE_IN_PROGRESS|DELETE_FAILED|SYNC_DELETE_IN_PROGRESS',
        ],
        'SuccessRetentionPeriodInDays' => <integer>,
        'Tags' => ['<string>', ...],
        'Timeline' => [
            'Created' => <DateTime>,
            'LastModified' => <DateTime>,
            'LastStarted' => <DateTime>,
            'LastStopped' => <DateTime>,
        ],
        'VisualReference' => [
            'BaseCanaryRunId' => '<string>',
            'BaseScreenshots' => [
                [
                    'IgnoreCoordinates' => ['<string>', ...],
                    'ScreenshotName' => '<string>',
                ],
                // ...
            ],
            'BrowserType' => 'CHROME|FIREFOX',
        ],
        'VisualReferences' => [
            [
                'BaseCanaryRunId' => '<string>',
                'BaseScreenshots' => [
                    [
                        'IgnoreCoordinates' => ['<string>', ...],
                        'ScreenshotName' => '<string>',
                    ],
                    // ...
                ],
                'BrowserType' => 'CHROME|FIREFOX',
            ],
            // ...
        ],
        'VpcConfig' => [
            'Ipv6AllowedForDualStack' => true || false,
            'SecurityGroupIds' => ['<string>', ...],
            'SubnetIds' => ['<string>', ...],
            'VpcId' => '<string>',
        ],
    ],
]
	Result Details
Members
- Canary
- 
- Type: Canary structure
 The full details about the canary you have created. 
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- RequestEntityTooLargeException:
- One of the input resources is larger than is allowed. 
CreateGroup
$result = $client->createGroup([/* ... */]); $promise = $client->createGroupAsync([/* ... */]);
Creates a group which you can use to associate canaries with each other, including cross-Region canaries. Using groups can help you with managing and automating your canaries, and you can also view aggregated run results and statistics for all canaries in a group.
Groups are global resources. When you create a group, it is replicated across Amazon Web Services Regions, and you can view it and add canaries to it from any Region. Although the group ARN format reflects the Region name where it was created, a group is not constrained to any Region. This means that you can put canaries from multiple Regions into the same group, and then use that group to view and manage all of those canaries in a single view.
Groups are supported in all Regions except the Regions that are disabled by default. For more information about these Regions, see Enabling a Region.
Each group can contain as many as 10 canaries. You can have as many as 20 groups in your account. Any single canary can be a member of up to 10 groups.
Parameter Syntax
$result = $client->createGroup([
    'Name' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...],
]);
	Parameter Details
Members
- Name
- 
- Required: Yes
- Type: string
 The name for the group. It can include any Unicode characters. The names for all groups in your account, across all Regions, must be unique. 
- Tags
- 
- Type: Associative array of custom strings keys (TagKey) to strings
 A list of key-value pairs to associate with the group. You can associate as many as 50 tags with a group. 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 the resources that have certain tag values. 
Result Syntax
[
    'Group' => [
        'Arn' => '<string>',
        'CreatedTime' => <DateTime>,
        'Id' => '<string>',
        'LastModifiedTime' => <DateTime>,
        'Name' => '<string>',
        'Tags' => ['<string>', ...],
    ],
]
	Result Details
Members
- Group
- 
- Type: Group structure
 A structure that contains information about the group that was just created. 
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ConflictException:
- A conflicting operation is already in progress. 
- ServiceQuotaExceededException:
- The request exceeded a service quota value. 
DeleteCanary
$result = $client->deleteCanary([/* ... */]); $promise = $client->deleteCanaryAsync([/* ... */]);
Permanently deletes the specified canary.
If the canary's ProvisionedResourceCleanup field is set to AUTOMATIC or you specify DeleteLambda in this operation as true, CloudWatch Synthetics also deletes the Lambda functions and layers that are used by the canary.
Other resources used and created by the canary are not automatically deleted. After you delete a canary, you should also delete the following:
-  The CloudWatch alarms created for this canary. These alarms have a name of Synthetics-Alarm-first-198-characters-of-canary-name-canaryId-alarm number
-  Amazon S3 objects and buckets, such as the canary's artifact location. 
-  IAM roles created for the canary. If they were created in the console, these roles have the name role/service-role/CloudWatchSyntheticsRole-First-21-Characters-of-CanaryName
-  CloudWatch Logs log groups created for the canary. These logs groups have the name /aws/lambda/cwsyn-First-21-Characters-of-CanaryName
Before you delete a canary, you might want to use GetCanary to display the information about this canary. Make note of the information returned by this operation so that you can delete these resources after you delete the canary.
Parameter Syntax
$result = $client->deleteCanary([
    'DeleteLambda' => true || false,
    'Name' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- DeleteLambda
- 
- Type: boolean
 Specifies whether to also delete the Lambda functions and layers used by this canary. The default is false.Your setting for this parameter is used only if the canary doesn't have AUTOMATICfor itsProvisionedResourceCleanupfield. If that field is set toAUTOMATIC, then the Lambda functions and layers will be deleted when this canary is deleted.Type: Boolean 
- Name
- 
- Required: Yes
- Type: string
 The name of the canary that you want to delete. To find the names of your canaries, use DescribeCanaries. 
Result Syntax
[]
Result Details
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
DeleteGroup
$result = $client->deleteGroup([/* ... */]); $promise = $client->deleteGroupAsync([/* ... */]);
Deletes a group. The group doesn't need to be empty to be deleted. If there are canaries in the group, they are not deleted when you delete the group.
Groups are a global resource that appear in all Regions, but the request to delete a group must be made from its home Region. You can find the home Region of a group within its ARN.
Parameter Syntax
$result = $client->deleteGroup([
    'GroupIdentifier' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- GroupIdentifier
- 
- Required: Yes
- Type: string
 Specifies which group to delete. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.
Result Syntax
[]
Result Details
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
DescribeCanaries
$result = $client->describeCanaries([/* ... */]); $promise = $client->describeCanariesAsync([/* ... */]);
This operation returns a list of the canaries in your account, along with full details about each canary.
This operation supports resource-level authorization using an IAM policy and the Names parameter. If you specify the Names parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response.
You are required to use the Names parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see  Limiting a user to viewing specific canaries.
Parameter Syntax
$result = $client->describeCanaries([
    'MaxResults' => <integer>,
    'Names' => ['<string>', ...],
    'NextToken' => '<string>',
]);
	Parameter Details
Members
- MaxResults
- 
- Type: int
 Specify this parameter to limit how many canaries are returned each time you use the DescribeCanariesoperation. If you omit this parameter, the default of 20 is used.
- Names
- 
- Type: Array of strings
 Use this parameter to return only canaries that match the names that you specify here. You can specify as many as five canary names. If you specify this parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response. You are required to use this parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see Limiting a user to viewing specific canaries. 
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent operation to retrieve the next set of results. 
Result Syntax
[
    'Canaries' => [
        [
            'ArtifactConfig' => [
                'S3Encryption' => [
                    'EncryptionMode' => 'SSE_S3|SSE_KMS',
                    'KmsKeyArn' => '<string>',
                ],
            ],
            'ArtifactS3Location' => '<string>',
            'BrowserConfigs' => [
                [
                    'BrowserType' => 'CHROME|FIREFOX',
                ],
                // ...
            ],
            'Code' => [
                'BlueprintTypes' => ['<string>', ...],
                'Dependencies' => [
                    [
                        'Reference' => '<string>',
                        'Type' => 'LambdaLayer',
                    ],
                    // ...
                ],
                'Handler' => '<string>',
                'SourceLocationArn' => '<string>',
            ],
            'DryRunConfig' => [
                'DryRunId' => '<string>',
                'LastDryRunExecutionStatus' => '<string>',
            ],
            'EngineArn' => '<string>',
            'EngineConfigs' => [
                [
                    'BrowserType' => 'CHROME|FIREFOX',
                    'EngineArn' => '<string>',
                ],
                // ...
            ],
            'ExecutionRoleArn' => '<string>',
            'FailureRetentionPeriodInDays' => <integer>,
            'Id' => '<string>',
            'Name' => '<string>',
            'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF',
            'RunConfig' => [
                'ActiveTracing' => true || false,
                'EphemeralStorage' => <integer>,
                'MemoryInMB' => <integer>,
                'TimeoutInSeconds' => <integer>,
            ],
            'RuntimeVersion' => '<string>',
            'Schedule' => [
                'DurationInSeconds' => <integer>,
                'Expression' => '<string>',
                'RetryConfig' => [
                    'MaxRetries' => <integer>,
                ],
            ],
            'Status' => [
                'State' => 'CREATING|READY|STARTING|RUNNING|UPDATING|STOPPING|STOPPED|ERROR|DELETING',
                'StateReason' => '<string>',
                'StateReasonCode' => 'INVALID_PERMISSIONS|CREATE_PENDING|CREATE_IN_PROGRESS|CREATE_FAILED|UPDATE_PENDING|UPDATE_IN_PROGRESS|UPDATE_COMPLETE|ROLLBACK_COMPLETE|ROLLBACK_FAILED|DELETE_IN_PROGRESS|DELETE_FAILED|SYNC_DELETE_IN_PROGRESS',
            ],
            'SuccessRetentionPeriodInDays' => <integer>,
            'Tags' => ['<string>', ...],
            'Timeline' => [
                'Created' => <DateTime>,
                'LastModified' => <DateTime>,
                'LastStarted' => <DateTime>,
                'LastStopped' => <DateTime>,
            ],
            'VisualReference' => [
                'BaseCanaryRunId' => '<string>',
                'BaseScreenshots' => [
                    [
                        'IgnoreCoordinates' => ['<string>', ...],
                        'ScreenshotName' => '<string>',
                    ],
                    // ...
                ],
                'BrowserType' => 'CHROME|FIREFOX',
            ],
            'VisualReferences' => [
                [
                    'BaseCanaryRunId' => '<string>',
                    'BaseScreenshots' => [
                        [
                            'IgnoreCoordinates' => ['<string>', ...],
                            'ScreenshotName' => '<string>',
                        ],
                        // ...
                    ],
                    'BrowserType' => 'CHROME|FIREFOX',
                ],
                // ...
            ],
            'VpcConfig' => [
                'Ipv6AllowedForDualStack' => true || false,
                'SecurityGroupIds' => ['<string>', ...],
                'SubnetIds' => ['<string>', ...],
                'VpcId' => '<string>',
            ],
        ],
        // ...
    ],
    'NextToken' => '<string>',
]
	Result Details
Members
- Canaries
- 
- Type: Array of Canary structures
 Returns an array. Each item in the array contains the full information about one canary. 
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent DescribeCanariesoperation to retrieve the next set of results.
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
DescribeCanariesLastRun
$result = $client->describeCanariesLastRun([/* ... */]); $promise = $client->describeCanariesLastRunAsync([/* ... */]);
Use this operation to see information from the most recent run of each canary that you have created.
This operation supports resource-level authorization using an IAM policy and the Names parameter. If you specify the Names parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response.
You are required to use the Names parameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see  Limiting a user to viewing specific canaries.
Parameter Syntax
$result = $client->describeCanariesLastRun([
    'BrowserType' => 'CHROME|FIREFOX',
    'MaxResults' => <integer>,
    'Names' => ['<string>', ...],
    'NextToken' => '<string>',
]);
	Parameter Details
Members
- BrowserType
- 
- Type: string
 The type of browser to use for the canary run. 
- MaxResults
- 
- Type: int
 Specify this parameter to limit how many runs are returned each time you use the DescribeLastRunoperation. If you omit this parameter, the default of 100 is used.
- Names
- 
- Type: Array of strings
 Use this parameter to return only canaries that match the names that you specify here. You can specify as many as five canary names. If you specify this parameter, the operation is successful only if you have authorization to view all the canaries that you specify in your request. If you do not have permission to view any of the canaries, the request fails with a 403 response. You are required to use the Namesparameter if you are logged on to a user or role that has an IAM policy that restricts which canaries that you are allowed to view. For more information, see Limiting a user to viewing specific canaries.
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent DescribeCanariesLastRunoperation to retrieve the next set of results.
Result Syntax
[
    'CanariesLastRun' => [
        [
            'CanaryName' => '<string>',
            'LastRun' => [
                'ArtifactS3Location' => '<string>',
                'BrowserType' => 'CHROME|FIREFOX',
                'DryRunConfig' => [
                    'DryRunId' => '<string>',
                ],
                'Id' => '<string>',
                'Name' => '<string>',
                'RetryAttempt' => <integer>,
                'ScheduledRunId' => '<string>',
                'Status' => [
                    'State' => 'RUNNING|PASSED|FAILED',
                    'StateReason' => '<string>',
                    'StateReasonCode' => 'CANARY_FAILURE|EXECUTION_FAILURE',
                    'TestResult' => 'PASSED|FAILED|UNKNOWN',
                ],
                'Timeline' => [
                    'Completed' => <DateTime>,
                    'MetricTimestampForRunAndRetries' => <DateTime>,
                    'Started' => <DateTime>,
                ],
            ],
        ],
        // ...
    ],
    'NextToken' => '<string>',
]
	Result Details
Members
- CanariesLastRun
- 
- Type: Array of CanaryLastRun structures
 An array that contains the information from the most recent run of each canary. 
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent DescribeCanariesLastRunoperation to retrieve the next set of results.
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
DescribeRuntimeVersions
$result = $client->describeRuntimeVersions([/* ... */]); $promise = $client->describeRuntimeVersionsAsync([/* ... */]);
Returns a list of Synthetics canary runtime versions. For more information, see Canary Runtime Versions.
Parameter Syntax
$result = $client->describeRuntimeVersions([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);
	Parameter Details
Members
- MaxResults
- 
- Type: int
 Specify this parameter to limit how many runs are returned each time you use the DescribeRuntimeVersionsoperation. If you omit this parameter, the default of 100 is used.
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent DescribeRuntimeVersionsoperation to retrieve the next set of results.
Result Syntax
[
    'NextToken' => '<string>',
    'RuntimeVersions' => [
        [
            'DeprecationDate' => <DateTime>,
            'Description' => '<string>',
            'ReleaseDate' => <DateTime>,
            'VersionName' => '<string>',
        ],
        // ...
    ],
]
	Result Details
Members
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent DescribeRuntimeVersionsoperation to retrieve the next set of results.
- RuntimeVersions
- 
- Type: Array of RuntimeVersion structures
 An array of objects that display the details about each Synthetics canary runtime version. 
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
DisassociateResource
$result = $client->disassociateResource([/* ... */]); $promise = $client->disassociateResourceAsync([/* ... */]);
Removes a canary from a group. You must run this operation in the Region where the canary exists.
Parameter Syntax
$result = $client->disassociateResource([
    'GroupIdentifier' => '<string>', // REQUIRED
    'ResourceArn' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- GroupIdentifier
- 
- Required: Yes
- Type: string
 Specifies the group. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.
- ResourceArn
- 
- Required: Yes
- Type: string
 The ARN of the canary that you want to remove from the specified group. 
Result Syntax
[]
Result Details
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
GetCanary
$result = $client->getCanary([/* ... */]); $promise = $client->getCanaryAsync([/* ... */]);
Retrieves complete information about one canary. You must specify the name of the canary that you want. To get a list of canaries and their names, use DescribeCanaries.
Parameter Syntax
$result = $client->getCanary([
    'DryRunId' => '<string>',
    'Name' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- DryRunId
- 
- Type: string
 The DryRunId associated with an existing canary’s dry run. You can use this DryRunId to retrieve information about the dry run. 
- Name
- 
- Required: Yes
- Type: string
 The name of the canary that you want details for. 
Result Syntax
[
    'Canary' => [
        'ArtifactConfig' => [
            'S3Encryption' => [
                'EncryptionMode' => 'SSE_S3|SSE_KMS',
                'KmsKeyArn' => '<string>',
            ],
        ],
        'ArtifactS3Location' => '<string>',
        'BrowserConfigs' => [
            [
                'BrowserType' => 'CHROME|FIREFOX',
            ],
            // ...
        ],
        'Code' => [
            'BlueprintTypes' => ['<string>', ...],
            'Dependencies' => [
                [
                    'Reference' => '<string>',
                    'Type' => 'LambdaLayer',
                ],
                // ...
            ],
            'Handler' => '<string>',
            'SourceLocationArn' => '<string>',
        ],
        'DryRunConfig' => [
            'DryRunId' => '<string>',
            'LastDryRunExecutionStatus' => '<string>',
        ],
        'EngineArn' => '<string>',
        'EngineConfigs' => [
            [
                'BrowserType' => 'CHROME|FIREFOX',
                'EngineArn' => '<string>',
            ],
            // ...
        ],
        'ExecutionRoleArn' => '<string>',
        'FailureRetentionPeriodInDays' => <integer>,
        'Id' => '<string>',
        'Name' => '<string>',
        'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF',
        'RunConfig' => [
            'ActiveTracing' => true || false,
            'EphemeralStorage' => <integer>,
            'MemoryInMB' => <integer>,
            'TimeoutInSeconds' => <integer>,
        ],
        'RuntimeVersion' => '<string>',
        'Schedule' => [
            'DurationInSeconds' => <integer>,
            'Expression' => '<string>',
            'RetryConfig' => [
                'MaxRetries' => <integer>,
            ],
        ],
        'Status' => [
            'State' => 'CREATING|READY|STARTING|RUNNING|UPDATING|STOPPING|STOPPED|ERROR|DELETING',
            'StateReason' => '<string>',
            'StateReasonCode' => 'INVALID_PERMISSIONS|CREATE_PENDING|CREATE_IN_PROGRESS|CREATE_FAILED|UPDATE_PENDING|UPDATE_IN_PROGRESS|UPDATE_COMPLETE|ROLLBACK_COMPLETE|ROLLBACK_FAILED|DELETE_IN_PROGRESS|DELETE_FAILED|SYNC_DELETE_IN_PROGRESS',
        ],
        'SuccessRetentionPeriodInDays' => <integer>,
        'Tags' => ['<string>', ...],
        'Timeline' => [
            'Created' => <DateTime>,
            'LastModified' => <DateTime>,
            'LastStarted' => <DateTime>,
            'LastStopped' => <DateTime>,
        ],
        'VisualReference' => [
            'BaseCanaryRunId' => '<string>',
            'BaseScreenshots' => [
                [
                    'IgnoreCoordinates' => ['<string>', ...],
                    'ScreenshotName' => '<string>',
                ],
                // ...
            ],
            'BrowserType' => 'CHROME|FIREFOX',
        ],
        'VisualReferences' => [
            [
                'BaseCanaryRunId' => '<string>',
                'BaseScreenshots' => [
                    [
                        'IgnoreCoordinates' => ['<string>', ...],
                        'ScreenshotName' => '<string>',
                    ],
                    // ...
                ],
                'BrowserType' => 'CHROME|FIREFOX',
            ],
            // ...
        ],
        'VpcConfig' => [
            'Ipv6AllowedForDualStack' => true || false,
            'SecurityGroupIds' => ['<string>', ...],
            'SubnetIds' => ['<string>', ...],
            'VpcId' => '<string>',
        ],
    ],
]
	Result Details
Members
- Canary
- 
- Type: Canary structure
 A structure that contains the full information about the canary. 
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
GetCanaryRuns
$result = $client->getCanaryRuns([/* ... */]); $promise = $client->getCanaryRunsAsync([/* ... */]);
Retrieves a list of runs for a specified canary.
Parameter Syntax
$result = $client->getCanaryRuns([
    'DryRunId' => '<string>',
    'MaxResults' => <integer>,
    'Name' => '<string>', // REQUIRED
    'NextToken' => '<string>',
    'RunType' => 'CANARY_RUN|DRY_RUN',
]);
	Parameter Details
Members
- DryRunId
- 
- Type: string
 The DryRunId associated with an existing canary’s dry run. You can use this DryRunId to retrieve information about the dry run. 
- MaxResults
- 
- Type: int
 Specify this parameter to limit how many runs are returned each time you use the GetCanaryRunsoperation. If you omit this parameter, the default of 100 is used.
- Name
- 
- Required: Yes
- Type: string
 The name of the canary that you want to see runs for. 
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent GetCanaryRunsoperation to retrieve the next set of results.When auto retry is enabled for the canary, the first subsequent retry is suffixed with *1 indicating its the first retry and the next subsequent try is suffixed with *2. 
- RunType
- 
- Type: string
 -  When you provide RunType=CANARY_RUNanddryRunId, you will get an exception
-  When a value is not provided for RunType, the default value isCANARY_RUN
-  When CANARY_RUNis provided, all canary runs excluding dry runs are returned
-  When DRY_RUNis provided, all dry runs excluding canary runs are returned
 
Result Syntax
[
    'CanaryRuns' => [
        [
            'ArtifactS3Location' => '<string>',
            'BrowserType' => 'CHROME|FIREFOX',
            'DryRunConfig' => [
                'DryRunId' => '<string>',
            ],
            'Id' => '<string>',
            'Name' => '<string>',
            'RetryAttempt' => <integer>,
            'ScheduledRunId' => '<string>',
            'Status' => [
                'State' => 'RUNNING|PASSED|FAILED',
                'StateReason' => '<string>',
                'StateReasonCode' => 'CANARY_FAILURE|EXECUTION_FAILURE',
                'TestResult' => 'PASSED|FAILED|UNKNOWN',
            ],
            'Timeline' => [
                'Completed' => <DateTime>,
                'MetricTimestampForRunAndRetries' => <DateTime>,
                'Started' => <DateTime>,
            ],
        ],
        // ...
    ],
    'NextToken' => '<string>',
]
	Result Details
Members
- CanaryRuns
- 
- Type: Array of CanaryRun structures
 An array of structures. Each structure contains the details of one of the retrieved canary runs. 
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent GetCanaryRunsoperation to retrieve the next set of results.
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
GetGroup
$result = $client->getGroup([/* ... */]); $promise = $client->getGroupAsync([/* ... */]);
Returns information about one group. Groups are a global resource, so you can use this operation from any Region.
Parameter Syntax
$result = $client->getGroup([
    'GroupIdentifier' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- GroupIdentifier
- 
- Required: Yes
- Type: string
 Specifies the group to return information for. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.
Result Syntax
[
    'Group' => [
        'Arn' => '<string>',
        'CreatedTime' => <DateTime>,
        'Id' => '<string>',
        'LastModifiedTime' => <DateTime>,
        'Name' => '<string>',
        'Tags' => ['<string>', ...],
    ],
]
	Result Details
Members
- Group
- 
- Type: Group structure
 A structure that contains information about the group. 
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
ListAssociatedGroups
$result = $client->listAssociatedGroups([/* ... */]); $promise = $client->listAssociatedGroupsAsync([/* ... */]);
Returns a list of the groups that the specified canary is associated with. The canary that you specify must be in the current Region.
Parameter Syntax
$result = $client->listAssociatedGroups([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
    'ResourceArn' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- MaxResults
- 
- Type: int
 Specify this parameter to limit how many groups are returned each time you use the ListAssociatedGroupsoperation. If you omit this parameter, the default of 20 is used.
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent operation to retrieve the next set of results. 
- ResourceArn
- 
- Required: Yes
- Type: string
 The ARN of the canary that you want to view groups for. 
Result Syntax
[
    'Groups' => [
        [
            'Arn' => '<string>',
            'Id' => '<string>',
            'Name' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]
	Result Details
Members
- Groups
- 
- Type: Array of GroupSummary structures
 An array of structures that contain information about the groups that this canary is associated with. 
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent ListAssociatedGroupsoperation to retrieve the next set of results.
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
ListGroupResources
$result = $client->listGroupResources([/* ... */]); $promise = $client->listGroupResourcesAsync([/* ... */]);
This operation returns a list of the ARNs of the canaries that are associated with the specified group.
Parameter Syntax
$result = $client->listGroupResources([
    'GroupIdentifier' => '<string>', // REQUIRED
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);
	Parameter Details
Members
- GroupIdentifier
- 
- Required: Yes
- Type: string
 Specifies the group to return information for. You can specify the group name, the ARN, or the group ID as the GroupIdentifier.
- MaxResults
- 
- Type: int
 Specify this parameter to limit how many canary ARNs are returned each time you use the ListGroupResourcesoperation. If you omit this parameter, the default of 20 is used.
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent operation to retrieve the next set of results. 
Result Syntax
[
    'NextToken' => '<string>',
    'Resources' => ['<string>', ...],
]
	Result Details
Members
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent ListGroupResourcesoperation to retrieve the next set of results.
- Resources
- 
- Type: Array of strings
 An array of ARNs. These ARNs are for the canaries that are associated with the group. 
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
ListGroups
$result = $client->listGroups([/* ... */]); $promise = $client->listGroupsAsync([/* ... */]);
Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs. The groups from all Regions are returned.
Parameter Syntax
$result = $client->listGroups([
    'MaxResults' => <integer>,
    'NextToken' => '<string>',
]);
	Parameter Details
Members
- MaxResults
- 
- Type: int
 Specify this parameter to limit how many groups are returned each time you use the ListGroupsoperation. If you omit this parameter, the default of 20 is used.
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent operation to retrieve the next set of results. 
Result Syntax
[
    'Groups' => [
        [
            'Arn' => '<string>',
            'Id' => '<string>',
            'Name' => '<string>',
        ],
        // ...
    ],
    'NextToken' => '<string>',
]
	Result Details
Members
- Groups
- 
- Type: Array of GroupSummary structures
 An array of structures that each contain information about one group. 
- NextToken
- 
- Type: string
 A token that indicates that there is more data available. You can use this token in a subsequent ListGroupsoperation to retrieve the next set of results.
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
ListTagsForResource
$result = $client->listTagsForResource([/* ... */]); $promise = $client->listTagsForResourceAsync([/* ... */]);
Displays the tags associated with a canary or group.
Parameter Syntax
$result = $client->listTagsForResource([
    'ResourceArn' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- ResourceArn
- 
- Required: Yes
- Type: string
 The ARN of the canary or group that you want to view tags for. The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name.The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name
Result Syntax
[
    'Tags' => ['<string>', ...],
]
	Result Details
Members
- Tags
- 
- Type: Associative array of custom strings keys (TagKey) to strings
 The list of tag keys and values associated with the resource that you specified. 
Errors
- BadRequestException:
- The request was not valid. 
- NotFoundException:
- The specified resource was not found. 
- TooManyRequestsException:
- There were too many simultaneous requests. Try the operation again. 
- ConflictException:
- A conflicting operation is already in progress. 
- InternalFailureException:
- An internal failure occurred. Try the operation again. 
StartCanary
$result = $client->startCanary([/* ... */]); $promise = $client->startCanaryAsync([/* ... */]);
Use this operation to run a canary that has already been created. The frequency of the canary runs is determined by the value of the canary's Schedule. To see a canary's schedule, use GetCanary.
Parameter Syntax
$result = $client->startCanary([
    'Name' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- Name
- 
- Required: Yes
- Type: string
 The name of the canary that you want to run. To find canary names, use DescribeCanaries. 
Result Syntax
[]
Result Details
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
StartCanaryDryRun
$result = $client->startCanaryDryRun([/* ... */]); $promise = $client->startCanaryDryRunAsync([/* ... */]);
Use this operation to start a dry run for a canary that has already been created
Parameter Syntax
$result = $client->startCanaryDryRun([
    'ArtifactConfig' => [
        'S3Encryption' => [
            'EncryptionMode' => 'SSE_S3|SSE_KMS',
            'KmsKeyArn' => '<string>',
        ],
    ],
    'ArtifactS3Location' => '<string>',
    'BrowserConfigs' => [
        [
            'BrowserType' => 'CHROME|FIREFOX',
        ],
        // ...
    ],
    'Code' => [
        'BlueprintTypes' => ['<string>', ...],
        'Dependencies' => [
            [
                'Reference' => '<string>', // REQUIRED
                'Type' => 'LambdaLayer',
            ],
            // ...
        ],
        'Handler' => '<string>',
        'S3Bucket' => '<string>',
        'S3Key' => '<string>',
        'S3Version' => '<string>',
        'ZipFile' => <string || resource || Psr\Http\Message\StreamInterface>,
    ],
    'ExecutionRoleArn' => '<string>',
    'FailureRetentionPeriodInDays' => <integer>,
    'Name' => '<string>', // REQUIRED
    'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF',
    'RunConfig' => [
        'ActiveTracing' => true || false,
        'EnvironmentVariables' => ['<string>', ...],
        'EphemeralStorage' => <integer>,
        'MemoryInMB' => <integer>,
        'TimeoutInSeconds' => <integer>,
    ],
    'RuntimeVersion' => '<string>',
    'SuccessRetentionPeriodInDays' => <integer>,
    'VisualReference' => [
        'BaseCanaryRunId' => '<string>', // REQUIRED
        'BaseScreenshots' => [
            [
                'IgnoreCoordinates' => ['<string>', ...],
                'ScreenshotName' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'BrowserType' => 'CHROME|FIREFOX',
    ],
    'VisualReferences' => [
        [
            'BaseCanaryRunId' => '<string>', // REQUIRED
            'BaseScreenshots' => [
                [
                    'IgnoreCoordinates' => ['<string>', ...],
                    'ScreenshotName' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'BrowserType' => 'CHROME|FIREFOX',
        ],
        // ...
    ],
    'VpcConfig' => [
        'Ipv6AllowedForDualStack' => true || false,
        'SecurityGroupIds' => ['<string>', ...],
        'SubnetIds' => ['<string>', ...],
    ],
]);
	Parameter Details
Members
- ArtifactConfig
- 
- Type: ArtifactConfigInput structure
 A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. 
- ArtifactS3Location
- 
- Type: string
 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 (.). 
- BrowserConfigs
- 
- Type: Array of BrowserConfig structures
 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.
- Code
- 
- Type: CanaryCodeInput structure
 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 Amazon 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.If you are uploading your canary scripts with an Amazon S3 bucket, your zip file should include your script in a certain folder structure. -  For Node.js canaries, the folder structure must be nodejs/node_modules/myCanaryFilename.jsFor more information, see Packaging your Node.js canary files
-  For Python canaries, the folder structure must be python/myCanaryFilename.pyorpython/myFolder/myCanaryFilename.pyFor more information, see Packaging your Python canary files
 
- ExecutionRoleArn
- 
- Type: string
 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.govskope.caas a principal in the trust policy. The role must also have the following permissions:
- FailureRetentionPeriodInDays
- 
- Type: int
 The number of days to retain data about failed runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days. This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console. 
- Name
- 
- Required: Yes
- Type: string
 The name of the canary that you want to dry run. To find canary names, use DescribeCanaries. 
- ProvisionedResourceCleanup
- 
- Type: string
 Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If you omit this parameter, the default of AUTOMATICis used, which means that the Lambda functions and layers will be deleted 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.
- RunConfig
- 
- Type: CanaryRunConfigInput structure
 A structure that contains input information for a canary run. 
- RuntimeVersion
- 
- Type: string
 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. 
- SuccessRetentionPeriodInDays
- 
- Type: int
 The number of days to retain data about successful runs of this canary. If you omit this field, the default of 31 days is used. The valid range is 1 to 455 days. This setting affects the range of information returned by GetCanaryRuns, as well as the range of information displayed in the Synthetics console. 
- VisualReference
- 
- Type: VisualReferenceInput structure
 An object that specifies what screenshots to use as a baseline for visual monitoring by this canary. It can optionally also specify parts of the screenshots to ignore during the visual monitoring comparison. 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 
- VisualReferences
- 
- Type: Array of VisualReferenceInput structures
 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.
- VpcConfig
- 
- Type: VpcConfigInput structure
 If this canary is to test an endpoint in a VPC, this structure contains information about the subnets and security groups of the VPC endpoint. For more information, see Running a Canary in a VPC. 
Result Syntax
[
    'DryRunConfig' => [
        'DryRunId' => '<string>',
        'LastDryRunExecutionStatus' => '<string>',
    ],
]
	Result Details
Members
- DryRunConfig
- 
- Type: DryRunConfigOutput structure
 Returns the dry run configurations for a canary. 
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
- AccessDeniedException:
- You don't have permission to perform this operation on this resource. 
StopCanary
$result = $client->stopCanary([/* ... */]); $promise = $client->stopCanaryAsync([/* ... */]);
Stops the canary to prevent all future runs. If the canary is currently running,the run that is in progress completes on its own, publishes metrics, and uploads artifacts, but it is not recorded in Synthetics as a completed run.
You can use StartCanary to start it running again with the canary’s current schedule at any point in the future. 
Parameter Syntax
$result = $client->stopCanary([
    'Name' => '<string>', // REQUIRED
]);
	Parameter Details
Members
- Name
- 
- Required: Yes
- Type: string
 The name of the canary that you want to stop. To find the names of your canaries, use ListCanaries. 
Result Syntax
[]
Result Details
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
TagResource
$result = $client->tagResource([/* ... */]); $promise = $client->tagResourceAsync([/* ... */]);
Assigns one or more tags (key-value pairs) to the specified canary or group.
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 resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, 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 or group.
Parameter Syntax
$result = $client->tagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'Tags' => ['<string>', ...], // REQUIRED
]);
	Parameter Details
Members
- ResourceArn
- 
- Required: Yes
- Type: string
 The ARN of the canary or group that you're adding tags to. The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name.The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name
- Tags
- 
- Required: Yes
- Type: Associative array of custom strings keys (TagKey) to strings
 The list of key-value pairs to associate with the resource. 
Result Syntax
[]
Result Details
Errors
- BadRequestException:
- The request was not valid. 
- NotFoundException:
- The specified resource was not found. 
- TooManyRequestsException:
- There were too many simultaneous requests. Try the operation again. 
- ConflictException:
- A conflicting operation is already in progress. 
- InternalFailureException:
- An internal failure occurred. Try the operation again. 
UntagResource
$result = $client->untagResource([/* ... */]); $promise = $client->untagResourceAsync([/* ... */]);
Removes one or more tags from the specified resource.
Parameter Syntax
$result = $client->untagResource([
    'ResourceArn' => '<string>', // REQUIRED
    'TagKeys' => ['<string>', ...], // REQUIRED
]);
	Parameter Details
Members
- ResourceArn
- 
- Required: Yes
- Type: string
 The ARN of the canary or group that you're removing tags from. The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name.The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name
- TagKeys
- 
- Required: Yes
- Type: Array of strings
 The list of tag keys to remove from the resource. 
Result Syntax
[]
Result Details
Errors
- BadRequestException:
- The request was not valid. 
- NotFoundException:
- The specified resource was not found. 
- TooManyRequestsException:
- There were too many simultaneous requests. Try the operation again. 
- ConflictException:
- A conflicting operation is already in progress. 
- InternalFailureException:
- An internal failure occurred. Try the operation again. 
UpdateCanary
$result = $client->updateCanary([/* ... */]); $promise = $client->updateCanaryAsync([/* ... */]);
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.
Parameter Syntax
$result = $client->updateCanary([
    'ArtifactConfig' => [
        'S3Encryption' => [
            'EncryptionMode' => 'SSE_S3|SSE_KMS',
            'KmsKeyArn' => '<string>',
        ],
    ],
    'ArtifactS3Location' => '<string>',
    'BrowserConfigs' => [
        [
            'BrowserType' => 'CHROME|FIREFOX',
        ],
        // ...
    ],
    'Code' => [
        'BlueprintTypes' => ['<string>', ...],
        'Dependencies' => [
            [
                'Reference' => '<string>', // REQUIRED
                'Type' => 'LambdaLayer',
            ],
            // ...
        ],
        'Handler' => '<string>',
        'S3Bucket' => '<string>',
        'S3Key' => '<string>',
        'S3Version' => '<string>',
        'ZipFile' => <string || resource || Psr\Http\Message\StreamInterface>,
    ],
    'DryRunId' => '<string>',
    'ExecutionRoleArn' => '<string>',
    'FailureRetentionPeriodInDays' => <integer>,
    'Name' => '<string>', // REQUIRED
    'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF',
    'RunConfig' => [
        'ActiveTracing' => true || false,
        'EnvironmentVariables' => ['<string>', ...],
        'EphemeralStorage' => <integer>,
        'MemoryInMB' => <integer>,
        'TimeoutInSeconds' => <integer>,
    ],
    'RuntimeVersion' => '<string>',
    'Schedule' => [
        'DurationInSeconds' => <integer>,
        'Expression' => '<string>', // REQUIRED
        'RetryConfig' => [
            'MaxRetries' => <integer>, // REQUIRED
        ],
    ],
    'SuccessRetentionPeriodInDays' => <integer>,
    'VisualReference' => [
        'BaseCanaryRunId' => '<string>', // REQUIRED
        'BaseScreenshots' => [
            [
                'IgnoreCoordinates' => ['<string>', ...],
                'ScreenshotName' => '<string>', // REQUIRED
            ],
            // ...
        ],
        'BrowserType' => 'CHROME|FIREFOX',
    ],
    'VisualReferences' => [
        [
            'BaseCanaryRunId' => '<string>', // REQUIRED
            'BaseScreenshots' => [
                [
                    'IgnoreCoordinates' => ['<string>', ...],
                    'ScreenshotName' => '<string>', // REQUIRED
                ],
                // ...
            ],
            'BrowserType' => 'CHROME|FIREFOX',
        ],
        // ...
    ],
    'VpcConfig' => [
        'Ipv6AllowedForDualStack' => true || false,
        'SecurityGroupIds' => ['<string>', ...],
        'SubnetIds' => ['<string>', ...],
    ],
]);
	Parameter Details
Members
- ArtifactConfig
- 
- Type: ArtifactConfigInput structure
 A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. 
- ArtifactS3Location
- 
- Type: string
 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 (.). 
- BrowserConfigs
- 
- Type: Array of BrowserConfig structures
 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.
- Code
- 
- Type: CanaryCodeInput structure
 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. 
- DryRunId
- 
- Type: string
 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.
- ExecutionRoleArn
- 
- Type: string
 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.govskope.caas 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
 
- FailureRetentionPeriodInDays
- 
- Type: int
 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. 
- Name
- 
- Required: Yes
- Type: string
 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. 
- ProvisionedResourceCleanup
- 
- Type: string
 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.
- RunConfig
- 
- Type: CanaryRunConfigInput structure
 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. 
- RuntimeVersion
- 
- Type: string
 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. 
- Schedule
- 
- Type: CanaryScheduleInput structure
 A structure that contains information about how often the canary is to run, and when these runs are to stop. 
- SuccessRetentionPeriodInDays
- 
- Type: int
 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. 
- VisualReference
- 
- Type: VisualReferenceInput structure
 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 
- VisualReferences
- 
- Type: Array of VisualReferenceInput structures
 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.
- VpcConfig
- 
- Type: VpcConfigInput structure
 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. 
Result Syntax
[]
Result Details
Errors
- InternalServerException:
- An unknown internal error occurred. 
- ValidationException:
- A parameter could not be validated. 
- ResourceNotFoundException:
- One of the specified resources was not found. 
- ConflictException:
- A conflicting operation is already in progress. 
- RequestEntityTooLargeException:
- One of the input resources is larger than is allowed. 
- AccessDeniedException:
- You don't have permission to perform this operation on this resource. 
Shapes
AccessDeniedException
Description
You don't have permission to perform this operation on this resource.
Members
- Message
- 
- Type: string
 
ArtifactConfigInput
Description
A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.
Members
- S3Encryption
- 
- Type: S3EncryptionConfig structure
 A structure that contains the configuration of the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. Artifact encryption functionality is available only for canaries that use Synthetics runtime version syn-nodejs-puppeteer-3.3 or later. For more information, see Encrypting canary artifacts 
ArtifactConfigOutput
Description
A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3.
Members
- S3Encryption
- 
- Type: S3EncryptionConfig structure
 A structure that contains the configuration of encryption settings for canary artifacts that are stored in Amazon S3. 
BadRequestException
Description
The request was not valid.
Members
- Message
- 
- Type: string
 
BaseScreenshot
Description
A structure representing a screenshot that is used as a baseline during visual monitoring comparisons made by the canary.
Members
- IgnoreCoordinates
- 
- Type: Array of strings
 Coordinates that define the part of a screen to ignore during screenshot comparisons. To obtain the coordinates to use here, use the CloudWatch console to draw the boundaries on the screen. For more information, see Editing or deleting a canary 
- ScreenshotName
- 
- Required: Yes
- Type: string
 The name of the screenshot. This is generated the first time the canary is run after the UpdateCanaryoperation that specified for this canary to perform visual monitoring.
BrowserConfig
Description
A structure that specifies the browser type to use for a canary run.
Members
- BrowserType
- 
- Type: string
 The browser type associated with this browser configuration. 
Canary
Description
This structure contains all information about one canary in your account.
Members
- ArtifactConfig
- 
- Type: ArtifactConfigOutput structure
 A structure that contains the configuration for canary artifacts, including the encryption-at-rest settings for artifacts that the canary uploads to Amazon S3. 
- ArtifactS3Location
- 
- Type: string
 The location in Amazon S3 where Synthetics stores artifacts from the runs of this canary. Artifacts include the log file, screenshots, and HAR files. 
- BrowserConfigs
- 
- Type: Array of BrowserConfig structures
 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.
- Code
- 
- Type: CanaryCodeOutput structure
 This structure contains information about the canary's Lambda handler and where its code is stored by CloudWatch Synthetics. 
- DryRunConfig
- 
- Type: DryRunConfigOutput structure
 Returns the dry run configurations for a canary. 
- EngineArn
- 
- Type: string
 The ARN of the Lambda function that is used as your canary's engine. For more information about Lambda ARN format, see Resources and Conditions for Lambda Actions. 
- EngineConfigs
- 
- Type: Array of EngineConfig structures
 A list of engine configurations for the canary, one for each browser type that the canary is configured to run on. All runtime versions syn-nodejs-puppeteer-11.0and above, andsyn-nodejs-playwright-3.0and above, useengineConfigsonly. You can no longer useengineArnin these versions.Runtime versions older than syn-nodejs-puppeteer-11.0andsyn-nodejs-playwright-3.0continue to supportengineArnto ensure backward compatibility.
- ExecutionRoleArn
- 
- Type: string
 The ARN of the IAM role used to run the canary. This role must include lambda.amazonaws.com.rproxy.govskope.caas a principal in the trust policy.
- FailureRetentionPeriodInDays
- 
- Type: int
 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. 
- Id
- 
- Type: string
 The unique ID of this canary. 
- Name
- 
- Type: string
 The name of the canary. 
- ProvisionedResourceCleanup
- 
- Type: string
 Specifies whether to also delete the Lambda functions and layers used by this canary when the canary is deleted. If it is AUTOMATIC, the Lambda functions and layers will be deleted 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.
- RunConfig
- 
- Type: CanaryRunConfigOutput structure
 A structure that contains information about a canary run. 
- RuntimeVersion
- 
- Type: string
 Specifies the runtime version to use for the canary. For more information about runtime versions, see Canary Runtime Versions. 
- Schedule
- 
- Type: CanaryScheduleOutput structure
 A structure that contains information about how often the canary is to run, and when these runs are to stop. 
- Status
- 
- Type: CanaryStatus structure
 A structure that contains information about the canary's status. 
- SuccessRetentionPeriodInDays
- 
- Type: int
 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. 
- Tags
- 
- Type: Associative array of custom strings keys (TagKey) to strings
 The list of key-value pairs that are associated with the canary. 
- Timeline
- 
- Type: CanaryTimeline structure
 A structure that contains information about when the canary was created, modified, and most recently run. 
- VisualReference
- 
- Type: VisualReferenceOutput structure
 If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run to use as the baseline for screenshots, and the coordinates of any parts of the screen to ignore during the visual monitoring comparison. 
- VisualReferences
- 
- Type: Array of VisualReferenceOutput structures
 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.
- VpcConfig
- 
- Type: VpcConfigOutput structure
 If this canary is to test an endpoint in a VPC, this structure contains information about the subnets and security groups of the VPC endpoint. For more information, see Running a Canary in a VPC. 
CanaryCodeInput
Description
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 Amazon 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. 
If you are uploading your canary scripts with an Amazon S3 bucket, your zip file should include your script in a certain folder structure.
-  For Node.js canaries, the folder structure must be nodejs/node_modules/myCanaryFilename.jsFor more information, see Packaging your Node.js canary files
-  For Python canaries, the folder structure must be python/myCanaryFilename.pyorpython/myFolder/myCanaryFilename.pyFor more information, see Packaging your Python canary files
Members
- BlueprintTypes
- 
- Type: Array of strings
 BlueprintTypesis a list of templates that enable simplified canary creation. You can create canaries for common monitoring scenarios by providing only a JSON configuration file instead of writing custom scripts. The only supported value ismulti-checks.Multi-checks monitors HTTP/DNS/SSL/TCP endpoints with built-in authentication schemes (Basic, API Key, OAuth, SigV4) and assertion capabilities. When you specify BlueprintTypes, the Handler field cannot be specified since the blueprint provides a pre-defined entry point.BlueprintTypesis supported only on canaries for syn-nodejs-3.0 runtime or later.
- Dependencies
- 
- Type: Array of Dependency structures
 A list of dependencies that should be used for running this canary. Specify the dependencies as a key-value pair, where the key is the type of dependency and the value is the dependency reference. 
- Handler
- 
- Type: string
 The entry point to use for the source code when running the canary. For canaries that use the syn-python-selenium-1.0runtime or asyn-nodejs.puppeteerruntime earlier thansyn-nodejs.puppeteer-3.4, the handler must be specified asfileName.handler. Forsyn-python-selenium-1.1,syn-nodejs.puppeteer-3.4, and later runtimes, the handler can be specified asfileName.functionName, or you can specify a folder where canary scripts reside asfolder/fileName.functionName.This field is required when you don't specify BlueprintTypesand is not allowed when you specifyBlueprintTypes.
- S3Bucket
- 
- Type: string
 If your canary script is located in Amazon S3, specify the bucket name here. Do not include s3://as the start of the bucket name.
- S3Key
- 
- Type: string
 The Amazon S3 key of your script. For more information, see Working with Amazon S3 Objects. 
- S3Version
- 
- Type: string
 The Amazon S3 version ID of your script. 
- ZipFile
- 
- Type: blob (string|resource|Psr\Http\Message\StreamInterface)
 If you input your canary script directly into the canary instead of referring to an Amazon S3 location, the value of this parameter is the base64-encoded contents of the .zip file that contains the script. It must be smaller than 225 Kb. For large canary scripts, we recommend that you use an Amazon S3 location instead of inputting it directly with this parameter. 
CanaryCodeOutput
Description
This structure contains information about the canary's Lambda handler and where its code is stored by CloudWatch Synthetics.
Members
- BlueprintTypes
- 
- Type: Array of strings
 BlueprintTypesis a list of templates that enable simplified canary creation. You can create canaries for common monitoring scenarios by providing only a JSON configuration file instead of writing custom scripts. The only supported value ismulti-checks.Multi-checks monitors HTTP/DNS/SSL/TCP endpoints with built-in authentication schemes (Basic, API Key, OAuth, SigV4) and assertion capabilities. When you specify BlueprintTypes, the Handler field cannot be specified since the blueprint provides a pre-defined entry point.BlueprintTypesis supported only on canaries for syn-nodejs-3.0 runtime or later.
- Dependencies
- 
- Type: Array of Dependency structures
 A list of dependencies that are used for running this canary. The dependencies are specified as a key-value pair, where the key is the type of dependency and the value is the dependency reference. 
- Handler
- 
- Type: string
 The entry point to use for the source code when running the canary. This field is required when you don't specify BlueprintTypesand is not allowed when you specifyBlueprintTypes.
- SourceLocationArn
- 
- Type: string
 The ARN of the Lambda layer where Synthetics stores the canary script code. 
CanaryDryRunConfigOutput
Description
Returns the dry run configurations set for a canary.
Members
- DryRunId
- 
- Type: string
 The DryRunId associated with an existing canary’s dry run. You can use this DryRunId to retrieve information about the dry run. 
CanaryLastRun
Description
This structure contains information about the most recent run of a single canary.
Members
- CanaryName
- 
- Type: string
 The name of the canary. 
- LastRun
- 
- Type: CanaryRun structure
 The results from this canary's most recent run. 
CanaryRun
Description
This structure contains the details about one run of one canary.
Members
- ArtifactS3Location
- 
- Type: string
 The location where the canary stored artifacts from the run. Artifacts include the log file, screenshots, and HAR files. 
- BrowserType
- 
- Type: string
 The browser type associated with this canary run. 
- DryRunConfig
- 
- Type: CanaryDryRunConfigOutput structure
 Returns the dry run configurations for a canary. 
- Id
- 
- Type: string
 A unique ID that identifies this canary run. 
- Name
- 
- Type: string
 The name of the canary. 
- RetryAttempt
- 
- Type: int
 The count in number of the retry attempt. 
- ScheduledRunId
- 
- Type: string
 The ID of the scheduled canary run. 
- Status
- 
- Type: CanaryRunStatus structure
 The status of this run. 
- Timeline
- 
- Type: CanaryRunTimeline structure
 A structure that contains the start and end times of this run. 
CanaryRunConfigInput
Description
A structure that contains input information for a canary run.
Members
- ActiveTracing
- 
- Type: boolean
 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.0or later for their canary runtime.
- EnvironmentVariables
- 
- Type: Associative array of custom strings keys (EnvironmentVariableName) to strings
 Specifies the keys and values to use for any environment variables used in the canary script. Use the following format: { "key1" : "value1", "key2" : "value2", ...} Keys must start with a letter and be at least two characters. The total size of your environment variables cannot exceed 4 KB. You can't specify any Lambda reserved environment variables as the keys for your environment variables. For more information about reserved keys, see Runtime environment variables. 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. 
- EphemeralStorage
- 
- Type: int
 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. 
- MemoryInMB
- 
- Type: int
 The maximum amount of memory available to the canary while it is running, in MB. This value must be a multiple of 64. 
- TimeoutInSeconds
- 
- Type: int
 How long the canary is allowed to run before it must stop. You can't set this time to be longer than the frequency of the runs of this canary. If you omit this field, the frequency of the canary is used as this value, up to a maximum of 14 minutes. 
CanaryRunConfigOutput
Description
A structure that contains information about a canary run.
Members
- ActiveTracing
- 
- Type: boolean
 Displays whether this canary run used active X-Ray tracing. 
- EphemeralStorage
- 
- Type: int
 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. 
- MemoryInMB
- 
- Type: int
 The maximum amount of memory available to the canary while it is running, in MB. This value must be a multiple of 64. 
- TimeoutInSeconds
- 
- Type: int
 How long the canary is allowed to run before it must stop. 
CanaryRunStatus
Description
This structure contains the status information about a canary run.
Members
- State
- 
- Type: string
 The current state of the run. 
- StateReason
- 
- Type: string
 If run of the canary failed, this field contains the reason for the error. 
- StateReasonCode
- 
- Type: string
 If this value is CANARY_FAILURE, 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.If this value is EXECUTION_FAILURE, a non-critical failure occurred such as failing to save generated debug artifacts (for example, screenshots or har files).If both types of failures occurred, the CANARY_FAILUREtakes precedence. To understand the exact error, use the StateReason API.
- TestResult
- 
- Type: string
 Specifies the status of canary script for this run. When Synthetics tries to determine the status but fails, the result is marked as UNKNOWN. For the overall status of canary run, see State.
CanaryRunTimeline
Description
This structure contains the start and end times of a single canary run.
Members
- Completed
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The end time of the run. 
- MetricTimestampForRunAndRetries
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The time at which the metrics will be generated for this run or retries. 
- Started
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The start time of the run. 
CanaryScheduleInput
Description
This structure specifies how often a canary is to make runs and the date and time when it should stop making runs.
Members
- DurationInSeconds
- 
- Type: long (int|float)
 How long, in seconds, for the canary to continue making regular runs according to the schedule in the Expressionvalue. If you specify 0, the canary continues making runs until you stop it. If you omit this field, the default of 0 is used.
- Expression
- 
- Required: Yes
- Type: string
 A rateexpression or acronexpression that defines how often the canary is to run.For a rate expression, The syntax is rate(number unit). unit can beminute,minutes, orhour.For example, rate(1 minute)runs the canary once a minute,rate(10 minutes)runs it once every 10 minutes, andrate(1 hour)runs it once every hour. You can specify a frequency betweenrate(1 minute)andrate(1 hour).Specifying rate(0 minute)orrate(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.
- RetryConfig
- 
- Type: RetryConfigInput structure
 A structure that contains the retry configuration for a canary 
CanaryScheduleOutput
Description
How long, in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
Members
- DurationInSeconds
- 
- Type: long (int|float)
 How long, in seconds, for the canary to continue making regular runs after it was created. The runs are performed according to the schedule in the Expressionvalue.
- Expression
- 
- Type: string
 A rateexpression or acronexpression that defines how often the canary is to run.For a rate expression, The syntax is rate(number unit). unit can beminute,minutes, orhour.For example, rate(1 minute)runs the canary once a minute,rate(10 minutes)runs it once every 10 minutes, andrate(1 hour)runs it once every hour. You can specify a frequency betweenrate(1 minute)andrate(1 hour).Specifying rate(0 minute)orrate(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.
- RetryConfig
- 
- Type: RetryConfigOutput structure
 A structure that contains the retry configuration for a canary 
CanaryStatus
Description
A structure that contains the current state of the canary.
Members
- State
- 
- Type: string
 The current state of the canary. 
- StateReason
- 
- Type: string
 If the canary creation or update failed, this field provides details on the failure. 
- StateReasonCode
- 
- Type: string
 If the canary creation or update failed, this field displays the reason code. 
CanaryTimeline
Description
This structure contains information about when the canary was created and modified.
Members
- Created
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The date and time the canary was created. 
- LastModified
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The date and time the canary was most recently modified. 
- LastStarted
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The date and time that the canary's most recent run started. 
- LastStopped
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The date and time that the canary's most recent run ended. 
ConflictException
Description
A conflicting operation is already in progress.
Members
- Message
- 
- Type: string
 
Dependency
Description
A structure that contains information about a dependency for a canary.
Members
- Reference
- 
- Required: Yes
- Type: string
 The dependency reference. For Lambda layers, this is the ARN of the Lambda layer. For more information about Lambda ARN format, see Lambda. 
- Type
- 
- Type: string
 The type of dependency. Valid value is LambdaLayer.
DryRunConfigOutput
Description
Returns the dry run configurations set for a canary.
Members
- DryRunId
- 
- Type: string
 The DryRunId associated with an existing canary’s dry run. You can use this DryRunId to retrieve information about the dry run. 
- LastDryRunExecutionStatus
- 
- Type: string
 Returns the last execution status for a canary's dry run. 
EngineConfig
Description
A structure of engine configurations for the canary, one for each browser type that the canary is configured to run on.
Members
- BrowserType
- 
- Type: string
 The browser type associated with this engine configuration. 
- EngineArn
- 
- Type: string
 Each engine configuration contains the ARN of the Lambda function that is used as the canary's engine for a specific browser type. 
Group
Description
This structure contains information about one group.
Members
- Arn
- 
- Type: string
 The ARN of the group. 
- CreatedTime
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The date and time that the group was created. 
- Id
- 
- Type: string
 The unique ID of the group. 
- LastModifiedTime
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The date and time that the group was most recently updated. 
- Name
- 
- Type: string
 The name of the group. 
- Tags
- 
- Type: Associative array of custom strings keys (TagKey) to strings
 The list of key-value pairs that are associated with the canary. 
GroupSummary
Description
A structure containing some information about a group.
Members
- Arn
- 
- Type: string
 The ARN of the group. 
- Id
- 
- Type: string
 The unique ID of the group. 
- Name
- 
- Type: string
 The name of the group. 
InternalFailureException
Description
An internal failure occurred. Try the operation again.
Members
- Message
- 
- Type: string
 
InternalServerException
Description
An unknown internal error occurred.
Members
- Message
- 
- Type: string
 
NotFoundException
Description
The specified resource was not found.
Members
- Message
- 
- Type: string
 
RequestEntityTooLargeException
Description
One of the input resources is larger than is allowed.
Members
- Message
- 
- Type: string
 
ResourceNotFoundException
Description
One of the specified resources was not found.
Members
- Message
- 
- Type: string
 
RetryConfigInput
Description
This structure contains information about the canary's retry configuration.
The default account level concurrent execution limit from Lambda is 1000. When you have more than 1000 canaries, it's possible there are more than 1000 Lambda invocations due to retries and the console might hang. For more information on the Lambda execution limit, see Understanding Lambda function scaling.
For canary with MaxRetries = 2, you need to set the CanaryRunConfigInput.TimeoutInSeconds to less than 600 seconds to avoid validation errors.
Members
- MaxRetries
- 
- Required: Yes
- Type: int
 The maximum number of retries. The value must be less than or equal to 2. 
RetryConfigOutput
Description
This structure contains information about the canary's retry configuration.
Members
- MaxRetries
- 
- Type: int
 The maximum number of retries. The value must be less than or equal to 2. 
RuntimeVersion
Description
This structure contains information about one canary runtime version. For more information about runtime versions, see Canary Runtime Versions.
Members
- DeprecationDate
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 If this runtime version is deprecated, this value is the date of deprecation. 
- Description
- 
- Type: string
 A description of the runtime version, created by Amazon. 
- ReleaseDate
- 
- Type: timestamp (string|DateTime or anything parsable by strtotime)
 The date that the runtime version was released. 
- VersionName
- 
- Type: string
 The name of the runtime version. For a list of valid runtime versions, see Canary Runtime Versions. 
S3EncryptionConfig
Description
A structure that contains the configuration of encryption-at-rest settings for canary artifacts that the canary uploads to Amazon S3.
For more information, see Encrypting canary artifacts
Members
- EncryptionMode
- 
- Type: string
 The encryption method to use for artifacts created by this canary. Specify SSE_S3to use server-side encryption (SSE) with an Amazon S3-managed key. SpecifySSE-KMSto use server-side encryption with a customer-managed KMS key.If you omit this parameter, an Amazon Web Services-managed KMS key is used. 
- KmsKeyArn
- 
- Type: string
 The ARN of the customer-managed KMS key to use, if you specify SSE-KMSforEncryptionMode
ServiceQuotaExceededException
Description
The request exceeded a service quota value.
Members
- Message
- 
- Type: string
 
TooManyRequestsException
Description
There were too many simultaneous requests. Try the operation again.
Members
- Message
- 
- Type: string
 
ValidationException
Description
A parameter could not be validated.
Members
- Message
- 
- Type: string
 
VisualReferenceInput
Description
An object that specifies what screenshots to use as a baseline for visual monitoring by this canary. It can optionally also specify parts of the screenshots to ignore during the visual monitoring comparison.
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
Members
- BaseCanaryRunId
- 
- Required: Yes
- Type: string
 Specifies which canary run to use the screenshots from as the baseline for future visual monitoring with this canary. Valid values are nextrunto use the screenshots from the next run after this update is made,lastrunto use the screenshots from the most recent run before this update was made, or the value ofIdin the CanaryRun from a run of this a canary in the past 31 days. If you specify theIdof a canary run older than 31 days, the operation returns a 400 validation exception error..
- BaseScreenshots
- 
- Type: Array of BaseScreenshot structures
 An array of screenshots that will be used as the baseline for visual monitoring in future runs of this canary. If there is a screenshot that you don't want to be used for visual monitoring, remove it from this array. 
- BrowserType
- 
- Type: string
 The browser type associated with this visual reference. 
VisualReferenceOutput
Description
If this canary performs visual monitoring by comparing screenshots, this structure contains the ID of the canary run that is used as the baseline for screenshots, and the coordinates of any parts of those screenshots that are ignored during visual monitoring comparison.
Visual monitoring is supported only on canaries running the syn-puppeteer-node-3.2 runtime or later.
Members
- BaseCanaryRunId
- 
- Type: string
 The ID of the canary run that produced the baseline screenshots that are used for visual monitoring comparisons by this canary. 
- BaseScreenshots
- 
- Type: Array of BaseScreenshot structures
 An array of screenshots that are used as the baseline for comparisons during visual monitoring. 
- BrowserType
- 
- Type: string
 The browser type associated with this visual reference. 
VpcConfigInput
Description
If this canary is to test an endpoint in a VPC, this structure contains information about the subnets and security groups of the VPC endpoint. For more information, see Running a Canary in a VPC.
Members
- Ipv6AllowedForDualStack
- 
- Type: boolean
 Set this to trueto allow outbound IPv6 traffic on VPC canaries that are connected to dual-stack subnets. The default isfalse
- SecurityGroupIds
- 
- Type: Array of strings
 The IDs of the security groups for this canary. 
- SubnetIds
- 
- Type: Array of strings
 The IDs of the subnets where this canary is to run. 
VpcConfigOutput
Description
If this canary is to test an endpoint in a VPC, this structure contains information about the subnets and security groups of the VPC endpoint. For more information, see Running a Canary in a VPC.
Members
- Ipv6AllowedForDualStack
- 
- Type: boolean
 Indicates whether this canary allows outbound IPv6 traffic if it is connected to dual-stack subnets. 
- SecurityGroupIds
- 
- Type: Array of strings
 The IDs of the security groups for this canary. 
- SubnetIds
- 
- Type: Array of strings
 The IDs of the subnets where this canary is to run. 
- VpcId
- 
- Type: string
 The IDs of the VPC where this canary is to run.