Class: AWSCDK::Synthetics::ArtifactsBucketLocation

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

Overview

Options for specifying the s3 location that stores the data of each canary run.

The artifacts bucket location cannot be updated once the canary is created.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(bucket:, prefix: nil) ⇒ ArtifactsBucketLocation

Returns a new instance of ArtifactsBucketLocation.

Parameters:

  • bucket (AWSCDK::S3::IBucket)

    The s3 location that stores the data of each run.

  • prefix (String, nil) (defaults to: nil)

    The S3 bucket prefix.



12
13
14
15
16
17
# File 'synthetics/artifacts_bucket_location.rb', line 12

def initialize(bucket:, prefix: nil)
  @bucket = bucket
  Jsii::Type.check_type(@bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  @prefix = prefix
  Jsii::Type.check_type(@prefix, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "prefix") unless @prefix.nil?
end

Instance Attribute Details

#bucketAWSCDK::S3::IBucket (readonly)

The s3 location that stores the data of each run.

Returns:



22
23
24
# File 'synthetics/artifacts_bucket_location.rb', line 22

def bucket
  @bucket
end

#prefixString? (readonly)

Note:

Default: - no prefix

The S3 bucket prefix.

Specify this if you want a more specific path within the artifacts bucket.

Returns:

  • (String, nil)


29
30
31
# File 'synthetics/artifacts_bucket_location.rb', line 29

def prefix
  @prefix
end

Class Method Details

.jsii_propertiesObject



31
32
33
34
35
36
# File 'synthetics/artifacts_bucket_location.rb', line 31

def self.jsii_properties
  {
    :bucket => "bucket",
    :prefix => "prefix",
  }
end

Instance Method Details

#to_jsiiObject



38
39
40
41
42
43
44
45
# File 'synthetics/artifacts_bucket_location.rb', line 38

def to_jsii
  result = {}
  result.merge!({
    "bucket" => @bucket,
    "prefix" => @prefix,
  })
  result.compact
end