Class: AWSCDK::Synthetics::CfnCanary::BaseScreenshotProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
synthetics/cfn_canary.rb

Overview

A structure representing a screenshot that is used as a baseline during visual monitoring comparisons made by the canary.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(screenshot_name:, ignore_coordinates: nil) ⇒ BaseScreenshotProperty

Returns a new instance of BaseScreenshotProperty.

Parameters:

  • screenshot_name (String)

    The name of the screenshot.

  • ignore_coordinates (Array<String>, nil) (defaults to: nil)

    Coordinates that define the part of a screen to ignore during screenshot comparisons.



845
846
847
848
849
850
# File 'synthetics/cfn_canary.rb', line 845

def initialize(screenshot_name:, ignore_coordinates: nil)
  @screenshot_name = screenshot_name
  Jsii::Type.check_type(@screenshot_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "screenshotName")
  @ignore_coordinates = ignore_coordinates
  Jsii::Type.check_type(@ignore_coordinates, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "ignoreCoordinates") unless @ignore_coordinates.nil?
end

Instance Attribute Details

#ignore_coordinatesArray<String>? (readonly)

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 Edit or delete a canary .



865
866
867
# File 'synthetics/cfn_canary.rb', line 865

def ignore_coordinates
  @ignore_coordinates
end

#screenshot_nameString (readonly)

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.



858
859
860
# File 'synthetics/cfn_canary.rb', line 858

def screenshot_name
  @screenshot_name
end

Class Method Details

.jsii_propertiesObject



867
868
869
870
871
872
# File 'synthetics/cfn_canary.rb', line 867

def self.jsii_properties
  {
    :screenshot_name => "screenshotName",
    :ignore_coordinates => "ignoreCoordinates",
  }
end

Instance Method Details

#to_jsiiObject



874
875
876
877
878
879
880
881
# File 'synthetics/cfn_canary.rb', line 874

def to_jsii
  result = {}
  result.merge!({
    "screenshotName" => @screenshot_name,
    "ignoreCoordinates" => @ignore_coordinates,
  })
  result.compact
end