Class: AWSCDK::APS::CfnScraperProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
aps/cfn_scraper_props.rb

Overview

Properties for defining a CfnScraper.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination:, scrape_configuration:, source:, _alias: nil, role_configuration: nil, scraper_logging_configuration: nil, tags: nil) ⇒ CfnScraperProps

Returns a new instance of CfnScraperProps.

Parameters:



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'aps/cfn_scraper_props.rb', line 16

def initialize(destination:, scrape_configuration:, source:, _alias: nil, role_configuration: nil, scraper_logging_configuration: nil, tags: nil)
  @destination = destination.is_a?(Hash) ? ::AWSCDK::APS::CfnScraper::DestinationProperty.new(**destination.transform_keys(&:to_sym)) : destination
  Jsii::Type.check_type(@destination, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuU2NyYXBlci5EZXN0aW5hdGlvblByb3BlcnR5In1dfX0=")), "destination")
  @scrape_configuration = scrape_configuration.is_a?(Hash) ? ::AWSCDK::APS::CfnScraper::ScrapeConfigurationProperty.new(**scrape_configuration.transform_keys(&:to_sym)) : scrape_configuration
  Jsii::Type.check_type(@scrape_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuU2NyYXBlci5TY3JhcGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "scrapeConfiguration")
  @source = source.is_a?(Hash) ? ::AWSCDK::APS::CfnScraper::SourceProperty.new(**source.transform_keys(&:to_sym)) : source
  Jsii::Type.check_type(@source, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuU2NyYXBlci5Tb3VyY2VQcm9wZXJ0eSJ9XX19")), "source")
  @_alias = _alias
  Jsii::Type.check_type(@_alias, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alias") unless @_alias.nil?
  @role_configuration = role_configuration.is_a?(Hash) ? ::AWSCDK::APS::CfnScraper::RoleConfigurationProperty.new(**role_configuration.transform_keys(&:to_sym)) : role_configuration
  Jsii::Type.check_type(@role_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuU2NyYXBlci5Sb2xlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "roleConfiguration") unless @role_configuration.nil?
  @scraper_logging_configuration = scraper_logging_configuration.is_a?(Hash) ? ::AWSCDK::APS::CfnScraper::ScraperLoggingConfigurationProperty.new(**scraper_logging_configuration.transform_keys(&:to_sym)) : scraper_logging_configuration
  Jsii::Type.check_type(@scraper_logging_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuU2NyYXBlci5TY3JhcGVyTG9nZ2luZ0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "scraperLoggingConfiguration") unless @scraper_logging_configuration.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#_aliasString? (readonly)

An optional user-assigned scraper alias.



52
53
54
# File 'aps/cfn_scraper_props.rb', line 52

def _alias
  @_alias
end

#destinationAWSCDK::IResolvable, AWSCDK::APS::CfnScraper::DestinationProperty (readonly)

The Amazon Managed Service for Prometheus workspace the scraper sends metrics to.



37
38
39
# File 'aps/cfn_scraper_props.rb', line 37

def destination
  @destination
end

#role_configurationAWSCDK::IResolvable, ... (readonly)

The role configuration in an Amazon Managed Service for Prometheus scraper.



57
58
59
# File 'aps/cfn_scraper_props.rb', line 57

def role_configuration
  @role_configuration
end

#scrape_configurationAWSCDK::IResolvable, AWSCDK::APS::CfnScraper::ScrapeConfigurationProperty (readonly)

The configuration in use by the scraper.



42
43
44
# File 'aps/cfn_scraper_props.rb', line 42

def scrape_configuration
  @scrape_configuration
end

#scraper_logging_configurationAWSCDK::IResolvable, ... (readonly)

The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.



62
63
64
# File 'aps/cfn_scraper_props.rb', line 62

def scraper_logging_configuration
  @scraper_logging_configuration
end

#sourceAWSCDK::IResolvable, AWSCDK::APS::CfnScraper::SourceProperty (readonly)

The Amazon EKS cluster from which the scraper collects metrics.



47
48
49
# File 'aps/cfn_scraper_props.rb', line 47

def source
  @source
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

(Optional) The list of tag keys and values associated with the scraper.



67
68
69
# File 'aps/cfn_scraper_props.rb', line 67

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



69
70
71
72
73
74
75
76
77
78
79
# File 'aps/cfn_scraper_props.rb', line 69

def self.jsii_properties
  {
    :destination => "destination",
    :scrape_configuration => "scrapeConfiguration",
    :source => "source",
    :_alias => "alias",
    :role_configuration => "roleConfiguration",
    :scraper_logging_configuration => "scraperLoggingConfiguration",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'aps/cfn_scraper_props.rb', line 81

def to_jsii
  result = {}
  result.merge!({
    "destination" => @destination,
    "scrapeConfiguration" => @scrape_configuration,
    "source" => @source,
    "alias" => @_alias,
    "roleConfiguration" => @role_configuration,
    "scraperLoggingConfiguration" => @scraper_logging_configuration,
    "tags" => @tags,
  })
  result.compact
end