@datafire/amazonaws_synthetics

5.0.0 • Public • Published

@datafire/amazonaws_synthetics

Client library for Synthetics

Installation and Usage

npm install --save @datafire/amazonaws_synthetics
let amazonaws_synthetics = require('@datafire/amazonaws_synthetics').create({
  accessKeyId: "",
  secretAccessKey: "",
  region: ""
});

.then(data => {
  console.log(data);
});

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.

Actions

DescribeCanaries

amazonaws_synthetics.DescribeCanaries({}, context)

Input

  • input object
    • MaxResults string
    • NextToken string
    • MaxResults integer: 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 100 is used.
    • NextToken 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.

Output

DescribeCanariesLastRun

amazonaws_synthetics.DescribeCanariesLastRun({}, context)

Input

  • input object
    • MaxResults string
    • NextToken string
    • MaxResults integer: 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.
    • NextToken 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.

Output

CreateCanary

amazonaws_synthetics.CreateCanary({
  "Name": "",
  "Code": {},
  "ArtifactS3Location": "",
  "ExecutionRoleArn": "",
  "Schedule": {},
  "RuntimeVersion": ""
}, context)

Input

  • input object
    • ArtifactS3Location required 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.
    • Code required object: 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.
      • Handler
      • S3Bucket
      • S3Key
      • S3Version
      • ZipFile
    • ExecutionRoleArn required 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 integer: 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 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.

    • RunConfig object: A structure that contains input information for a canary run.
      • ActiveTracing
      • EnvironmentVariables
      • MemoryInMB
      • TimeoutInSeconds
    • RuntimeVersion required 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 object: This structure specifies how often a canary is to make runs and the date and time when it should stop making runs.
      • DurationInSeconds
      • Expression
    • SuccessRetentionPeriodInDays integer: 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 object:

      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.

    • VpcConfig object: 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.

Output

DeleteCanary

amazonaws_synthetics.DeleteCanary({
  "name": ""
}, context)

Input

  • input object
    • name required string

Output

GetCanary

amazonaws_synthetics.GetCanary({
  "name": ""
}, context)

Input

  • input object
    • name required string

Output

UpdateCanary

amazonaws_synthetics.UpdateCanary({
  "name": ""
}, context)

Input

  • input object
    • name required string
    • Code object: 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.
      • Handler
      • S3Bucket
      • S3Key
      • S3Version
      • ZipFile
    • ExecutionRoleArn 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 integer: The number of days to retain data about failed runs of this canary.
    • RunConfig object: A structure that contains input information for a canary run.
      • ActiveTracing
      • EnvironmentVariables
      • MemoryInMB
      • TimeoutInSeconds
    • RuntimeVersion 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 object: This structure specifies how often a canary is to make runs and the date and time when it should stop making runs.
      • DurationInSeconds
      • Expression
    • SuccessRetentionPeriodInDays integer: The number of days to retain data about successful runs of this canary.
    • VpcConfig object: 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.

Output

GetCanaryRuns

amazonaws_synthetics.GetCanaryRuns({
  "name": ""
}, context)

Input

  • input object
    • name required string
    • MaxResults string
    • NextToken string
    • MaxResults integer: 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.
    • NextToken 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.

Output

StartCanary

amazonaws_synthetics.StartCanary({
  "name": ""
}, context)

Input

  • input object
    • name required string

Output

StopCanary

amazonaws_synthetics.StopCanary({
  "name": ""
}, context)

Input

  • input object
    • name required string

Output

DescribeRuntimeVersions

amazonaws_synthetics.DescribeRuntimeVersions({}, context)

Input

  • input object
    • MaxResults string
    • NextToken string
    • MaxResults integer: 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 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.

Output

ListTagsForResource

amazonaws_synthetics.ListTagsForResource({
  "resourceArn": ""
}, context)

Input

  • input object
    • resourceArn required string

Output

TagResource

amazonaws_synthetics.TagResource({
  "resourceArn": "",
  "Tags": {}
}, context)

Input

  • input object
    • resourceArn required string
    • Tags required object: The list of key-value pairs to associate with the canary.

Output

UntagResource

amazonaws_synthetics.UntagResource({
  "resourceArn": "",
  "tagKeys": []
}, context)

Input

  • input object
    • resourceArn required string
    • tagKeys required array

Output

Definitions

Blob

  • Blob string

Canaries

CanariesLastRun

Canary

  • Canary object: This structure contains all information about one canary in your account.
    • ArtifactS3Location
    • Code CanaryCodeOutput
    • EngineArn
    • ExecutionRoleArn
    • FailureRetentionPeriodInDays
    • Id
    • Name
    • RunConfig CanaryRunConfigOutput
    • RuntimeVersion
    • Schedule
      • DurationInSeconds
      • Expression
    • Status
      • State
      • StateReason
      • StateReasonCode
    • SuccessRetentionPeriodInDays
    • Tags
    • Timeline
      • Created
      • LastModified
      • LastStarted
      • LastStopped
    • VpcConfig VpcConfigOutput

CanaryArn

  • CanaryArn string

CanaryCodeInput

  • CanaryCodeInput object: 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.
    • Handler required
    • S3Bucket
    • S3Key
    • S3Version
    • ZipFile

CanaryCodeOutput

  • CanaryCodeOutput object: This structure contains information about the canary's Lambda handler and where its code is stored by CloudWatch Synthetics.
    • Handler
    • SourceLocationArn

CanaryLastRun

  • CanaryLastRun object: This structure contains information about the most recent run of a single canary.
    • CanaryName
    • LastRun
      • ArtifactS3Location
      • Id
      • Name
      • Status
        • State
        • StateReason
        • StateReasonCode
      • Timeline
        • Completed
        • Started

CanaryName

  • CanaryName string

CanaryRun

  • CanaryRun object: This structure contains the details about one run of one canary.
    • ArtifactS3Location
    • Id
    • Name
    • Status
      • State
      • StateReason
      • StateReasonCode
    • Timeline
      • Completed
      • Started

CanaryRunConfigInput

  • CanaryRunConfigInput object: A structure that contains input information for a canary run.
    • ActiveTracing
    • EnvironmentVariables
    • MemoryInMB
    • TimeoutInSeconds

CanaryRunConfigOutput

  • CanaryRunConfigOutput object: A structure that contains information about a canary run.
    • ActiveTracing
    • MemoryInMB
    • TimeoutInSeconds

CanaryRunState

  • CanaryRunState string (values: RUNNING, PASSED, FAILED)

CanaryRunStateReasonCode

  • CanaryRunStateReasonCode string (values: CANARY_FAILURE, EXECUTION_FAILURE)

CanaryRunStatus

  • CanaryRunStatus object: This structure contains the status information about a canary run.
    • State
    • StateReason
    • StateReasonCode

CanaryRunTimeline

  • CanaryRunTimeline object: This structure contains the start and end times of a single canary run.
    • Completed
    • Started

CanaryRuns

CanaryScheduleInput

  • CanaryScheduleInput object: This structure specifies how often a canary is to make runs and the date and time when it should stop making runs.
    • DurationInSeconds
    • Expression required

CanaryScheduleOutput

  • CanaryScheduleOutput object: How long, in seconds, for the canary to continue making regular runs according to the schedule in the Expression value.
    • DurationInSeconds
    • Expression

CanaryState

  • CanaryState string (values: CREATING, READY, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR, DELETING)

CanaryStateReasonCode

  • CanaryStateReasonCode string (values: INVALID_PERMISSIONS)

CanaryStatus

  • CanaryStatus object: A structure that contains the current state of the canary.
    • State
    • StateReason
    • StateReasonCode

CanaryTimeline

  • CanaryTimeline object: This structure contains information about when the canary was created and modified.
    • Created
    • LastModified
    • LastStarted
    • LastStopped

ConflictException

CreateCanaryRequest

  • CreateCanaryRequest object
    • ArtifactS3Location required
    • Code required
      • Handler required
      • S3Bucket
      • S3Key
      • S3Version
      • ZipFile
    • ExecutionRoleArn required
    • FailureRetentionPeriodInDays
    • Name required
    • RunConfig
      • ActiveTracing
      • EnvironmentVariables
      • MemoryInMB
      • TimeoutInSeconds
    • RuntimeVersion required
    • Schedule required
      • DurationInSeconds
      • Expression required
    • SuccessRetentionPeriodInDays
    • Tags
    • VpcConfig

CreateCanaryResponse

  • CreateCanaryResponse object
    • Canary
      • ArtifactS3Location
      • Code CanaryCodeOutput
      • EngineArn
      • ExecutionRoleArn
      • FailureRetentionPeriodInDays
      • Id
      • Name
      • RunConfig CanaryRunConfigOutput
      • RuntimeVersion
      • Schedule
        • DurationInSeconds
        • Expression
      • Status
        • State
        • StateReason
        • StateReasonCode
      • SuccessRetentionPeriodInDays
      • Tags
      • Timeline
        • Created
        • LastModified
        • LastStarted
        • LastStopped
      • VpcConfig VpcConfigOutput

DeleteCanaryRequest

  • DeleteCanaryRequest object

DeleteCanaryResponse

  • DeleteCanaryResponse object

DescribeCanariesLastRunRequest

  • DescribeCanariesLastRunRequest object
    • MaxResults
    • NextToken

DescribeCanariesLastRunResponse

  • DescribeCanariesLastRunResponse object

DescribeCanariesRequest

  • DescribeCanariesRequest object
    • MaxResults
    • NextToken

DescribeCanariesResponse

  • DescribeCanariesResponse object
    • Canaries
    • NextToken

DescribeRuntimeVersionsRequest

  • DescribeRuntimeVersionsRequest object
    • MaxResults
    • NextToken

DescribeRuntimeVersionsResponse

  • DescribeRuntimeVersionsResponse object

EnvironmentVariableName

  • EnvironmentVariableName string

EnvironmentVariableValue

  • EnvironmentVariableValue string

EnvironmentVariablesMap

  • EnvironmentVariablesMap object

FunctionArn

  • FunctionArn string

GetCanaryRequest

  • GetCanaryRequest object

GetCanaryResponse

  • GetCanaryResponse object
    • Canary
      • ArtifactS3Location
      • Code CanaryCodeOutput
      • EngineArn
      • ExecutionRoleArn
      • FailureRetentionPeriodInDays
      • Id
      • Name
      • RunConfig CanaryRunConfigOutput
      • RuntimeVersion
      • Schedule
        • DurationInSeconds
        • Expression
      • Status
        • State
        • StateReason
        • StateReasonCode
      • SuccessRetentionPeriodInDays
      • Tags
      • Timeline
        • Created
        • LastModified
        • LastStarted
        • LastStopped
      • VpcConfig VpcConfigOutput

GetCanaryRunsRequest

  • GetCanaryRunsRequest object
    • MaxResults
    • NextToken

GetCanaryRunsResponse

  • GetCanaryRunsResponse object

InternalServerException

ListTagsForResourceRequest

  • ListTagsForResourceRequest object

ListTagsForResourceResponse

  • ListTagsForResourceResponse object
    • Tags

MaxCanaryResults

  • MaxCanaryResults integer

MaxFifteenMinutesInSeconds

  • MaxFifteenMinutesInSeconds integer

MaxOneYearInSeconds

  • MaxOneYearInSeconds integer

MaxSize100

  • MaxSize100 integer

MaxSize1024

  • MaxSize1024 integer

MaxSize3008

  • MaxSize3008 integer

NullableBoolean

  • NullableBoolean boolean

ResourceNotFoundException

RoleArn

  • RoleArn string

RuntimeVersion

  • RuntimeVersion object: This structure contains information about one canary runtime version. For more information about runtime versions, see Canary Runtime Versions.
    • DeprecationDate
    • Description
    • ReleaseDate
    • VersionName

RuntimeVersionList

SecurityGroupId

  • SecurityGroupId string

SecurityGroupIds

StartCanaryRequest

  • StartCanaryRequest object

StartCanaryResponse

  • StartCanaryResponse object

StopCanaryRequest

  • StopCanaryRequest object

StopCanaryResponse

  • StopCanaryResponse object

String

  • String string

SubnetId

  • SubnetId string

SubnetIds

TagKey

  • TagKey string

TagKeyList

  • TagKeyList array

TagMap

  • TagMap object

TagResourceRequest

  • TagResourceRequest object
    • Tags required

TagResourceResponse

  • TagResourceResponse object

TagValue

  • TagValue string

Timestamp

  • Timestamp string

Token

  • Token string

UUID

  • UUID string

UntagResourceRequest

  • UntagResourceRequest object

UntagResourceResponse

  • UntagResourceResponse object

UpdateCanaryRequest

  • UpdateCanaryRequest object
    • Code
      • Handler required
      • S3Bucket
      • S3Key
      • S3Version
      • ZipFile
    • ExecutionRoleArn
    • FailureRetentionPeriodInDays
    • RunConfig
      • ActiveTracing
      • EnvironmentVariables
      • MemoryInMB
      • TimeoutInSeconds
    • RuntimeVersion
    • Schedule
      • DurationInSeconds
      • Expression required
    • SuccessRetentionPeriodInDays
    • VpcConfig

UpdateCanaryResponse

  • UpdateCanaryResponse object

ValidationException

VpcConfigInput

  • VpcConfigInput object: 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.

VpcConfigOutput

  • VpcConfigOutput object: 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.

VpcId

  • VpcId string

Readme

Keywords

none

Package Sidebar

Install

npm i @datafire/amazonaws_synthetics

Weekly Downloads

2

Version

5.0.0

License

MIT

Unpacked Size

143 kB

Total Files

4

Last publish

Collaborators

  • datafire