Class: AWSCDK::CloudWatch::CfnDashboardProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudWatch::CfnDashboardProps
- Defined in:
- cloud_watch/cfn_dashboard_props.rb
Overview
Properties for defining a CfnDashboard.
Instance Attribute Summary collapse
-
#dashboard_body ⇒ String
readonly
The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard.
-
#dashboard_name ⇒ String?
readonly
The name of the dashboard.
-
#tags ⇒ Array<AWSCDK::CfnTag>?
readonly
A list of key-value pairs to associate with the cloudwatch dashboard.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(dashboard_body:, dashboard_name: nil, tags: nil) ⇒ CfnDashboardProps
constructor
A new instance of CfnDashboardProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(dashboard_body:, dashboard_name: nil, tags: nil) ⇒ CfnDashboardProps
Returns a new instance of CfnDashboardProps.
12 13 14 15 16 17 18 19 |
# File 'cloud_watch/cfn_dashboard_props.rb', line 12 def initialize(dashboard_body:, dashboard_name: nil, tags: nil) @dashboard_body = dashboard_body Jsii::Type.check_type(@dashboard_body, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dashboardBody") @dashboard_name = dashboard_name Jsii::Type.check_type(@dashboard_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dashboardName") unless @dashboard_name.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? end |
Instance Attribute Details
#dashboard_body ⇒ String (readonly)
The detailed information about the dashboard in JSON format, including the widgets to include and their location on the dashboard.
This parameter is required.
For more information about the syntax, see Dashboard Body Structure and Syntax .
29 30 31 |
# File 'cloud_watch/cfn_dashboard_props.rb', line 29 def dashboard_body @dashboard_body end |
#dashboard_name ⇒ String? (readonly)
The name of the dashboard.
The name must be between 1 and 255 characters. If you do not specify a name, one will be generated automatically.
36 37 38 |
# File 'cloud_watch/cfn_dashboard_props.rb', line 36 def dashboard_name @dashboard_name end |
#tags ⇒ Array<AWSCDK::CfnTag>? (readonly)
A list of key-value pairs to associate with the cloudwatch dashboard.
You can associate up to 50 tags with a dashboard
43 44 45 |
# File 'cloud_watch/cfn_dashboard_props.rb', line 43 def @tags end |
Class Method Details
.jsii_properties ⇒ Object
45 46 47 48 49 50 51 |
# File 'cloud_watch/cfn_dashboard_props.rb', line 45 def self.jsii_properties { :dashboard_body => "dashboardBody", :dashboard_name => "dashboardName", :tags => "tags", } end |
Instance Method Details
#to_jsii ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'cloud_watch/cfn_dashboard_props.rb', line 53 def to_jsii result = {} result.merge!({ "dashboardBody" => @dashboard_body, "dashboardName" => @dashboard_name, "tags" => @tags, }) result.compact end |