Class: AWSCDK::CloudTrail::CfnDashboardProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_trail/cfn_dashboard_props.rb

Overview

Properties for defining a CfnDashboard.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, refresh_schedule: nil, tags: nil, termination_protection_enabled: nil, widgets: nil) ⇒ CfnDashboardProps

Returns a new instance of CfnDashboardProps.

Parameters:



14
15
16
17
18
19
20
21
22
23
24
25
# File 'cloud_trail/cfn_dashboard_props.rb', line 14

def initialize(name: nil, refresh_schedule: nil, tags: nil, termination_protection_enabled: nil, widgets: nil)
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @refresh_schedule = refresh_schedule.is_a?(Hash) ? ::AWSCDK::CloudTrail::CfnDashboard::RefreshScheduleProperty.new(**refresh_schedule.transform_keys(&:to_sym)) : refresh_schedule
  Jsii::Type.check_type(@refresh_schedule, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jbG91ZHRyYWlsLkNmbkRhc2hib2FyZC5SZWZyZXNoU2NoZWR1bGVQcm9wZXJ0eSJ9XX19")), "refreshSchedule") unless @refresh_schedule.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?
  @termination_protection_enabled = termination_protection_enabled
  Jsii::Type.check_type(@termination_protection_enabled, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "terminationProtectionEnabled") unless @termination_protection_enabled.nil?
  @widgets = widgets
  Jsii::Type.check_type(@widgets, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWR0cmFpbC5DZm5EYXNoYm9hcmQuV2lkZ2V0UHJvcGVydHkifV19fSwia2luZCI6ImFycmF5In19XX19")), "widgets") unless @widgets.nil?
end

Instance Attribute Details

#nameString? (readonly)

The name of the dashboard. The name must be unique to your account.

To create the Highlights dashboard, the name must be AWSCloudTrail-Highlights .



33
34
35
# File 'cloud_trail/cfn_dashboard_props.rb', line 33

def name
  @name
end

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

The schedule for a dashboard refresh.



38
39
40
# File 'cloud_trail/cfn_dashboard_props.rb', line 38

def refresh_schedule
  @refresh_schedule
end

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

A list of tags.



43
44
45
# File 'cloud_trail/cfn_dashboard_props.rb', line 43

def tags
  @tags
end

#termination_protection_enabledBoolean, ... (readonly)

Specifies whether termination protection is enabled for the dashboard.

If termination protection is enabled, you cannot delete the dashboard until termination protection is disabled.



50
51
52
# File 'cloud_trail/cfn_dashboard_props.rb', line 50

def termination_protection_enabled
  @termination_protection_enabled
end

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

An array of widgets for a custom dashboard. A custom dashboard can have a maximum of ten widgets.

You do not need to specify widgets for the Highlights dashboard.



57
58
59
# File 'cloud_trail/cfn_dashboard_props.rb', line 57

def widgets
  @widgets
end

Class Method Details

.jsii_propertiesObject



59
60
61
62
63
64
65
66
67
# File 'cloud_trail/cfn_dashboard_props.rb', line 59

def self.jsii_properties
  {
    :name => "name",
    :refresh_schedule => "refreshSchedule",
    :tags => "tags",
    :termination_protection_enabled => "terminationProtectionEnabled",
    :widgets => "widgets",
  }
end

Instance Method Details

#to_jsiiObject



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

def to_jsii
  result = {}
  result.merge!({
    "name" => @name,
    "refreshSchedule" => @refresh_schedule,
    "tags" => @tags,
    "terminationProtectionEnabled" => @termination_protection_enabled,
    "widgets" => @widgets,
  })
  result.compact
end