Synthetics class
You can use Amazon CloudWatch Synthetics to continually monitor your services. You can create and manage canaries, which are modular, lightweight scripts that monitor your endpoints and APIs from the outside-in. You can set up your canaries to run 24 hours a day, once per minute. The 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. The canaries seamlessly integrate with CloudWatch ServiceLens to help you trace the causes of impacted nodes in your applications. For more information, see Using ServiceLens to Monitor the Health of Your Applications in the Amazon CloudWatch User Guide.
Constructors
- Synthetics({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
associateResource(
{required String groupIdentifier, required String resourceArn}) → Future< void> - 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.
-
close(
) → void - Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
-
createCanary(
{required String artifactS3Location, required CanaryCodeInput code, required String executionRoleArn, required String name, required String runtimeVersion, required CanaryScheduleInput schedule, ArtifactConfigInput? artifactConfig, List< BrowserConfig> ? browserConfigs, int? failureRetentionPeriodInDays, ProvisionedResourceCleanupSetting? provisionedResourceCleanup, List<ResourceToTag> ? resourcesToReplicateTags, CanaryRunConfigInput? runConfig, int? successRetentionPeriodInDays, Map<String, String> ? tags, VpcConfigInput? vpcConfig}) → Future<CreateCanaryResponse> - 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.
-
createGroup(
{required String name, Map< String, String> ? tags}) → Future<CreateGroupResponse> - 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.
-
deleteCanary(
{required String name, bool? deleteLambda}) → Future< void> - Permanently deletes the specified canary.
-
deleteGroup(
{required String groupIdentifier}) → Future< void> - 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.
-
describeCanaries(
{int? maxResults, List< String> ? names, String? nextToken}) → Future<DescribeCanariesResponse> - This operation returns a list of the canaries in your account, along with full details about each canary.
-
describeCanariesLastRun(
{BrowserType? browserType, int? maxResults, List< String> ? names, String? nextToken}) → Future<DescribeCanariesLastRunResponse> - Use this operation to see information from the most recent run of each canary that you have created.
-
describeRuntimeVersions(
{int? maxResults, String? nextToken}) → Future< DescribeRuntimeVersionsResponse> - Returns a list of Synthetics canary runtime versions. For more information, see Canary Runtime Versions.
-
disassociateResource(
{required String groupIdentifier, required String resourceArn}) → Future< void> - Removes a canary from a group. You must run this operation in the Region where the canary exists.
-
getCanary(
{required String name, String? dryRunId}) → Future< GetCanaryResponse> - 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.
-
getCanaryRuns(
{required String name, String? dryRunId, int? maxResults, String? nextToken, RunType? runType}) → Future< GetCanaryRunsResponse> - Retrieves a list of runs for a specified canary.
-
getGroup(
{required String groupIdentifier}) → Future< GetGroupResponse> - Returns information about one group. Groups are a global resource, so you can use this operation from any Region.
-
listAssociatedGroups(
{required String resourceArn, int? maxResults, String? nextToken}) → Future< ListAssociatedGroupsResponse> - Returns a list of the groups that the specified canary is associated with. The canary that you specify must be in the current Region.
-
listGroupResources(
{required String groupIdentifier, int? maxResults, String? nextToken}) → Future< ListGroupResourcesResponse> - This operation returns a list of the ARNs of the canaries that are associated with the specified group.
-
listGroups(
{int? maxResults, String? nextToken}) → Future< ListGroupsResponse> - Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs. The groups from all Regions are returned.
-
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceResponse> - Displays the tags associated with a canary or group.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startCanary(
{required String name}) → Future< void> -
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. -
startCanaryDryRun(
{required String name, ArtifactConfigInput? artifactConfig, String? artifactS3Location, List< BrowserConfig> ? browserConfigs, CanaryCodeInput? code, String? executionRoleArn, int? failureRetentionPeriodInDays, ProvisionedResourceCleanupSetting? provisionedResourceCleanup, CanaryRunConfigInput? runConfig, String? runtimeVersion, int? successRetentionPeriodInDays, VisualReferenceInput? visualReference, List<VisualReferenceInput> ? visualReferences, VpcConfigInput? vpcConfig}) → Future<StartCanaryDryRunResponse> - Use this operation to start a dry run for a canary that has already been created
-
stopCanary(
{required String name}) → Future< void> - 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.
-
tagResource(
{required String resourceArn, required Map< String, String> tags}) → Future<void> - Assigns one or more tags (key-value pairs) to the specified canary or group.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> tagKeys}) → Future<void> - Removes one or more tags from the specified resource.
-
updateCanary(
{required String name, ArtifactConfigInput? artifactConfig, String? artifactS3Location, List< BrowserConfig> ? browserConfigs, CanaryCodeInput? code, String? dryRunId, String? executionRoleArn, int? failureRetentionPeriodInDays, ProvisionedResourceCleanupSetting? provisionedResourceCleanup, CanaryRunConfigInput? runConfig, String? runtimeVersion, CanaryScheduleInput? schedule, int? successRetentionPeriodInDays, VisualReferenceInput? visualReference, List<VisualReferenceInput> ? visualReferences, VpcConfigInput? vpcConfig}) → Future<void> - Updates the configuration of a canary that has already been created.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited