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.
- 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 'Code' => [ // REQUIRED 'Handler' => '<string>', // REQUIRED '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>', ...], 'MemoryInMB' => <integer>, 'TimeoutInSeconds' => <integer>, ], 'RuntimeVersion' => '<string>', // REQUIRED 'Schedule' => [ // REQUIRED 'DurationInSeconds' => <integer>, 'Expression' => '<string>', // 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 S3 bucket can't include a period (.).
- 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 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
as 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.
- 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
AUTOMATIC
is 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 theDeleteLambda
parameter 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
Tags
parameter, 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.
The environment variables keys and values are not encrypted. Do not store sensitive information in this field.
- 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.
- 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>', 'Code' => [ 'Handler' => '<string>', 'SourceLocationArn' => '<string>', ], 'EngineArn' => '<string>', 'ExecutionRoleArn' => '<string>', 'FailureRetentionPeriodInDays' => <integer>, 'Id' => '<string>', 'Name' => '<string>', 'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF', 'RunConfig' => [ 'ActiveTracing' => true || false, 'MemoryInMB' => <integer>, 'TimeoutInSeconds' => <integer>, ], 'RuntimeVersion' => '<string>', 'Schedule' => [ 'DurationInSeconds' => <integer>, 'Expression' => '<string>', ], '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>', ], // ... ], ], '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
AUTOMATIC
for itsProvisionedResourceCleanup
field. 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
DescribeCanaries
operation. 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>', 'Code' => [ 'Handler' => '<string>', 'SourceLocationArn' => '<string>', ], 'EngineArn' => '<string>', 'ExecutionRoleArn' => '<string>', 'FailureRetentionPeriodInDays' => <integer>, 'Id' => '<string>', 'Name' => '<string>', 'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF', 'RunConfig' => [ 'ActiveTracing' => true || false, 'MemoryInMB' => <integer>, 'TimeoutInSeconds' => <integer>, ], 'RuntimeVersion' => '<string>', 'Schedule' => [ 'DurationInSeconds' => <integer>, 'Expression' => '<string>', ], '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>', ], // ... ], ], '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
DescribeCanaries
operation 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([ 'MaxResults' => <integer>, 'Names' => ['<string>', ...], 'NextToken' => '<string>', ]);
Parameter Details
Members
- MaxResults
-
- Type: int
Specify this parameter to limit how many runs are returned each time you use the
DescribeLastRun
operation. 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
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. - NextToken
-
- Type: string
A token that indicates that there is more data available. You can use this token in a subsequent
DescribeCanariesLastRun
operation to retrieve the next set of results.
Result Syntax
[ 'CanariesLastRun' => [ [ 'CanaryName' => '<string>', 'LastRun' => [ 'ArtifactS3Location' => '<string>', 'Id' => '<string>', 'Name' => '<string>', 'Status' => [ 'State' => 'RUNNING|PASSED|FAILED', 'StateReason' => '<string>', 'StateReasonCode' => 'CANARY_FAILURE|EXECUTION_FAILURE', ], 'Timeline' => [ 'Completed' => <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
DescribeCanariesLastRun
operation 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
DescribeRuntimeVersions
operation. 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
DescribeRuntimeVersions
operation 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
DescribeRuntimeVersions
operation 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([ 'Name' => '<string>', // REQUIRED ]);
Parameter Details
Members
- 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>', 'Code' => [ 'Handler' => '<string>', 'SourceLocationArn' => '<string>', ], 'EngineArn' => '<string>', 'ExecutionRoleArn' => '<string>', 'FailureRetentionPeriodInDays' => <integer>, 'Id' => '<string>', 'Name' => '<string>', 'ProvisionedResourceCleanup' => 'AUTOMATIC|OFF', 'RunConfig' => [ 'ActiveTracing' => true || false, 'MemoryInMB' => <integer>, 'TimeoutInSeconds' => <integer>, ], 'RuntimeVersion' => '<string>', 'Schedule' => [ 'DurationInSeconds' => <integer>, 'Expression' => '<string>', ], '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>', ], // ... ], ], '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([ 'MaxResults' => <integer>, 'Name' => '<string>', // REQUIRED 'NextToken' => '<string>', ]);
Parameter Details
Members
- MaxResults
-
- Type: int
Specify this parameter to limit how many runs are returned each time you use the
GetCanaryRuns
operation. 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
GetCanaryRuns
operation to retrieve the next set of results.
Result Syntax
[ 'CanaryRuns' => [ [ 'ArtifactS3Location' => '<string>', 'Id' => '<string>', 'Name' => '<string>', 'Status' => [ 'State' => 'RUNNING|PASSED|FAILED', 'StateReason' => '<string>', 'StateReasonCode' => 'CANARY_FAILURE|EXECUTION_FAILURE', ], 'Timeline' => [ 'Completed' => <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
GetCanaryRuns
operation 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
ListAssociatedGroups
operation. 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
ListAssociatedGroups
operation 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
ListGroupResources
operation. 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
ListGroupResources
operation 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
ListGroups
operation. 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
ListGroups
operation 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.
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.
You can't use this operation to update the tags of an existing canary. To change the tags of an existing canary, use TagResource.
Parameter Syntax
$result = $client->updateCanary([ 'ArtifactConfig' => [ 'S3Encryption' => [ 'EncryptionMode' => 'SSE_S3|SSE_KMS', 'KmsKeyArn' => '<string>', ], ], 'ArtifactS3Location' => '<string>', 'Code' => [ 'Handler' => '<string>', // REQUIRED '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>', ...], 'MemoryInMB' => <integer>, 'TimeoutInSeconds' => <integer>, ], 'RuntimeVersion' => '<string>', 'Schedule' => [ 'DurationInSeconds' => <integer>, 'Expression' => '<string>', // REQUIRED ], 'SuccessRetentionPeriodInDays' => <integer>, 'VisualReference' => [ 'BaseCanaryRunId' => '<string>', // REQUIRED 'BaseScreenshots' => [ [ 'IgnoreCoordinates' => ['<string>', ...], 'ScreenshotName' => '<string>', // REQUIRED ], // ... ], ], '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 S3 bucket can't include a period (.).
- 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 S3 bucket, the bucket name, key, and version are also included.
- 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
as 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.
- 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 theDeleteLambda
parameter 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.
The environment variables keys and values are not encrypted. Do not store sensitive information in this field.
- 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.
- 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
- 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.
Shapes
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
UpdateCanary
operation that specified for this canary to perform visual monitoring.
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.
- Code
-
- Type: CanaryCodeOutput structure
This structure contains information about the canary's Lambda handler and where its code is stored by CloudWatch Synthetics.
- 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.
- ExecutionRoleArn
-
- Type: string
The ARN of the IAM role used to run the canary. This role must include
lambda.amazonaws.com
as a principal in the trust policy. - FailureRetentionPeriodInDays
-
- Type: int
The number of days to retain data about failed runs of this canary.
- 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 theDeleteLambda
parameter 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.
- 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.
- 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 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.js
For more information, see Packaging your Node.js canary files -
For Python canaries, the folder structure must be
python/myCanaryFilename.p
orpython/myFolder/myCanaryFilename.py
For more information, see Packaging your Python canary files
Members
- Handler
-
- Required: Yes
- Type: string
The entry point to use for the source code when running the canary. For canaries that use the
syn-python-selenium-1.0
runtime or asyn-nodejs.puppeteer
runtime 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
. - S3Bucket
-
- Type: string
If your canary script is located in S3, specify the bucket name here. Do not include
s3://
as the start of the bucket name. - S3Key
-
- Type: string
The S3 key of your script. For more information, see Working with Amazon S3 Objects.
- S3Version
-
- Type: string
The 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 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 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
- Handler
-
- Type: string
The entry point to use for the source code when running the canary.
- SourceLocationArn
-
- Type: string
The ARN of the Lambda layer where Synthetics stores the canary script code.
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.
- Id
-
- Type: string
A unique ID that identifies this canary run.
- Name
-
- Type: string
The name of the canary.
- 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.0
or 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.
The environment variables keys and values are not encrypted. Do not store sensitive information in this field.
- 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.
- 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
, an exception occurred in the canary code. If this value isEXECUTION_FAILURE
, an exception occurred in CloudWatch Synthetics.
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.
- 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
Expression
value. 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
rate
expression or acron
expression 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.
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
Expression
value. - Expression
-
- Type: string
A
rate
expression or acron
expression 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.
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 has insufficient permissions to run, this field provides more details.
- StateReasonCode
-
- Type: string
If the canary cannot run or has failed, this field displays the reason.
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
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
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_S3
to use server-side encryption (SSE) with an Amazon S3-managed key. SpecifySSE-KMS
to 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-KMS
forEncryptionMode
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
nextrun
to use the screenshots from the next run after this update is made,lastrun
to use the screenshots from the most recent run before this update was made, or the value ofId
in the CanaryRun from a run of this a canary in the past 31 days. If you specify theId
of 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.
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.
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
true
to 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.