Class: AWSCDK::IoT::CfnFleetMetricProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::IoT::CfnFleetMetricProps
- Defined in:
- io_t/cfn_fleet_metric_props.rb
Overview
Properties for defining a CfnFleetMetric.
Instance Attribute Summary collapse
-
#aggregation_field ⇒ String?
readonly
The field to aggregate.
-
#aggregation_type ⇒ AWSCDK::IResolvable, ...
readonly
The type of the aggregation query.
-
#description ⇒ String?
readonly
The fleet metric description.
-
#index_name ⇒ String?
readonly
The name of the index to search.
-
#metric_name ⇒ String
readonly
The name of the fleet metric to create.
-
#period ⇒ Numeric?
readonly
The time in seconds between fleet metric emissions.
-
#query_string ⇒ String?
readonly
The search query string.
-
#query_version ⇒ String?
readonly
The query version.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
Metadata which can be used to manage the fleet metric.
-
#unit ⇒ String?
readonly
Used to support unit transformation such as milliseconds to seconds.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(metric_name:, aggregation_field: nil, aggregation_type: nil, description: nil, index_name: nil, period: nil, query_string: nil, query_version: nil, tags: nil, unit: nil) ⇒ CfnFleetMetricProps
constructor
A new instance of CfnFleetMetricProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(metric_name:, aggregation_field: nil, aggregation_type: nil, description: nil, index_name: nil, period: nil, query_string: nil, query_version: nil, tags: nil, unit: nil) ⇒ CfnFleetMetricProps
Returns a new instance of CfnFleetMetricProps.
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'io_t/cfn_fleet_metric_props.rb', line 19 def initialize(metric_name:, aggregation_field: nil, aggregation_type: nil, description: nil, index_name: nil, period: nil, query_string: nil, query_version: nil, tags: nil, unit: nil) @metric_name = metric_name Jsii::Type.check_type(@metric_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "metricName") @aggregation_field = aggregation_field Jsii::Type.check_type(@aggregation_field, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "aggregationField") unless @aggregation_field.nil? @aggregation_type = aggregation_type.is_a?(Hash) ? ::AWSCDK::IoT::CfnFleetMetric::AggregationTypeProperty.new(**aggregation_type.transform_keys(&:to_sym)) : aggregation_type Jsii::Type.check_type(@aggregation_type, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pb3QuQ2ZuRmxlZXRNZXRyaWMuQWdncmVnYXRpb25UeXBlUHJvcGVydHkifV19fQ==")), "aggregationType") unless @aggregation_type.nil? @description = description Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil? @index_name = index_name Jsii::Type.check_type(@index_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "indexName") unless @index_name.nil? @period = period Jsii::Type.check_type(@period, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "period") unless @period.nil? @query_string = query_string Jsii::Type.check_type(@query_string, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryString") unless @query_string.nil? @query_version = query_version Jsii::Type.check_type(@query_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "queryVersion") unless @query_version.nil? @tags = .is_a?(Array) ? .map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil? @unit = unit Jsii::Type.check_type(@unit, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "unit") unless @unit.nil? end |
Instance Attribute Details
#aggregation_field ⇒ String? (readonly)
The field to aggregate.
51 52 53 |
# File 'io_t/cfn_fleet_metric_props.rb', line 51 def aggregation_field @aggregation_field end |
#aggregation_type ⇒ AWSCDK::IResolvable, ... (readonly)
The type of the aggregation query.
56 57 58 |
# File 'io_t/cfn_fleet_metric_props.rb', line 56 def aggregation_type @aggregation_type end |
#description ⇒ String? (readonly)
The fleet metric description.
61 62 63 |
# File 'io_t/cfn_fleet_metric_props.rb', line 61 def description @description end |
#index_name ⇒ String? (readonly)
The name of the index to search.
66 67 68 |
# File 'io_t/cfn_fleet_metric_props.rb', line 66 def index_name @index_name end |
#metric_name ⇒ String (readonly)
The name of the fleet metric to create.
46 47 48 |
# File 'io_t/cfn_fleet_metric_props.rb', line 46 def metric_name @metric_name end |
#period ⇒ Numeric? (readonly)
The time in seconds between fleet metric emissions.
Range [60(1 min), 86400(1 day)] and must be multiple of 60.
73 74 75 |
# File 'io_t/cfn_fleet_metric_props.rb', line 73 def period @period end |
#query_string ⇒ String? (readonly)
The search query string.
78 79 80 |
# File 'io_t/cfn_fleet_metric_props.rb', line 78 def query_string @query_string end |
#query_version ⇒ String? (readonly)
The query version.
83 84 85 |
# File 'io_t/cfn_fleet_metric_props.rb', line 83 def query_version @query_version end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
Metadata which can be used to manage the fleet metric.
88 89 90 |
# File 'io_t/cfn_fleet_metric_props.rb', line 88 def @tags end |
#unit ⇒ String? (readonly)
Used to support unit transformation such as milliseconds to seconds.
Must be a unit supported by CW metric. Default to null.
95 96 97 |
# File 'io_t/cfn_fleet_metric_props.rb', line 95 def unit @unit end |
Class Method Details
.jsii_properties ⇒ Object
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'io_t/cfn_fleet_metric_props.rb', line 97 def self.jsii_properties { :metric_name => "metricName", :aggregation_field => "aggregationField", :aggregation_type => "aggregationType", :description => "description", :index_name => "indexName", :period => "period", :query_string => "queryString", :query_version => "queryVersion", :tags => "tags", :unit => "unit", } end |
Instance Method Details
#to_jsii ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'io_t/cfn_fleet_metric_props.rb', line 112 def to_jsii result = {} result.merge!({ "metricName" => @metric_name, "aggregationField" => @aggregation_field, "aggregationType" => @aggregation_type, "description" => @description, "indexName" => @index_name, "period" => @period, "queryString" => @query_string, "queryVersion" => @query_version, "tags" => @tags, "unit" => @unit, }) result.compact end |