Skip to content

Client

synthetics R Documentation

Synthetics

Description

Amazon CloudWatch Synthetics

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.

Before you create and manage canaries, be aware of the security considerations. For more information, see Security Considerations for Synthetics Canaries.

Usage

synthetics(
  config = list(),
  credentials = list(),
  endpoint = NULL,
  region = NULL
)

Arguments

config

Optional configuration of credentials, endpoint, and/or region.

  • credentials:

    • creds:

      • access_key_id: AWS access key ID

      • secret_access_key: AWS secret access key

      • session_token: AWS temporary session token

    • profile: The name of a profile to use. If not given, then the default profile is used.

    • anonymous: Set anonymous credentials.

  • endpoint: The complete URL to use for the constructed client.

  • region: The AWS Region used in instantiating the client.

  • close_connection: Immediately close all HTTP connections.

  • timeout: The time in seconds till a timeout exception is thrown when attempting to make a connection. The default is 60 seconds.

  • s3_force_path_style: Set this to true to force the request to use path-style addressing, i.e. ⁠http://s3.amazonaws.com/BUCKET/KEY⁠.

  • sts_regional_endpoint: Set sts regional endpoint resolver to regional or legacy https://docs.aws.amazon.com/sdkref/latest/guide/feature-sts-regionalized-endpoints.html

credentials

Optional credentials shorthand for the config parameter

  • creds:

    • access_key_id: AWS access key ID

    • secret_access_key: AWS secret access key

    • session_token: AWS temporary session token

  • profile: The name of a profile to use. If not given, then the default profile is used.

  • anonymous: Set anonymous credentials.

endpoint

Optional shorthand for complete URL to use for the constructed client.

region

Optional shorthand for AWS Region used in instantiating the client.

Value

A client for the service. You can call the service's operations using syntax like svc$operation(...), where svc is the name you've assigned to the client. The available operations are listed in the Operations section.

Service syntax

svc <- synthetics(
  config = list(
    credentials = list(
      creds = list(
        access_key_id = "string",
        secret_access_key = "string",
        session_token = "string"
      ),
      profile = "string",
      anonymous = "logical"
    ),
    endpoint = "string",
    region = "string",
    close_connection = "logical",
    timeout = "numeric",
    s3_force_path_style = "logical",
    sts_regional_endpoint = "string"
  ),
  credentials = list(
    creds = list(
      access_key_id = "string",
      secret_access_key = "string",
      session_token = "string"
    ),
    profile = "string",
    anonymous = "logical"
  ),
  endpoint = "string",
  region = "string"
)

Operations

associate_resource
Associates a canary with a group
create_canary
Creates a canary
create_group
Creates a group which you can use to associate canaries with each other, including cross-Region canaries
delete_canary
Permanently deletes the specified canary
delete_group
Deletes a group
describe_canaries
This operation returns a list of the canaries in your account, along with full details about each canary
describe_canaries_last_run
Use this operation to see information from the most recent run of each canary that you have created
describe_runtime_versions
Returns a list of Synthetics canary runtime versions
disassociate_resource
Removes a canary from a group
get_canary
Retrieves complete information about one canary
get_canary_runs
Retrieves a list of runs for a specified canary
get_group
Returns information about one group
list_associated_groups
Returns a list of the groups that the specified canary is associated with
list_group_resources
This operation returns a list of the ARNs of the canaries that are associated with the specified group
list_groups
Returns a list of all groups in the account, displaying their names, unique IDs, and ARNs
list_tags_for_resource
Displays the tags associated with a canary or group
start_canary
Use this operation to run a canary that has already been created
stop_canary
Stops the canary to prevent all future runs
tag_resource
Assigns one or more tags (key-value pairs) to the specified canary or group
untag_resource
Removes one or more tags from the specified resource
update_canary
Updates the configuration of a canary that has already been created

Examples

## Not run: 
svc <- synthetics()
svc$associate_resource(
  Foo = 123
)

## End(Not run)