Class: AWSCDK::GuardDuty::CfnMalwareProtectionPlanProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
guard_duty/cfn_malware_protection_plan_props.rb

Overview

Properties for defining a CfnMalwareProtectionPlan.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(protected_resource:, role:, actions: nil, tags: nil) ⇒ CfnMalwareProtectionPlanProps

Returns a new instance of CfnMalwareProtectionPlanProps.

Parameters:



13
14
15
16
17
18
19
20
21
22
# File 'guard_duty/cfn_malware_protection_plan_props.rb', line 13

def initialize(protected_resource:, role:, actions: nil, tags: nil)
  @protected_resource = protected_resource.is_a?(Hash) ? ::AWSCDK::GuardDuty::CfnMalwareProtectionPlan::CFNProtectedResourceProperty.new(**protected_resource.transform_keys(&:to_sym)) : protected_resource
  Jsii::Type.check_type(@protected_resource, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ndWFyZGR1dHkuQ2ZuTWFsd2FyZVByb3RlY3Rpb25QbGFuLkNGTlByb3RlY3RlZFJlc291cmNlUHJvcGVydHkifV19fQ==")), "protectedResource")
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "role")
  @actions = actions.is_a?(Hash) ? ::AWSCDK::GuardDuty::CfnMalwareProtectionPlan::CFNActionsProperty.new(**actions.transform_keys(&:to_sym)) : actions
  Jsii::Type.check_type(@actions, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ndWFyZGR1dHkuQ2ZuTWFsd2FyZVByb3RlY3Rpb25QbGFuLkNGTkFjdGlvbnNQcm9wZXJ0eSJ9XX19")), "actions") unless @actions.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::GuardDuty::CfnMalwareProtectionPlan::TagItemProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ndWFyZGR1dHkuQ2ZuTWFsd2FyZVByb3RlY3Rpb25QbGFuLlRhZ0l0ZW1Qcm9wZXJ0eSJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

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

Specifies the action that is to be applied to the Malware Protection plan resource.



42
43
44
# File 'guard_duty/cfn_malware_protection_plan_props.rb', line 42

def actions
  @actions
end

#protected_resourceAWSCDK::IResolvable, AWSCDK::GuardDuty::CfnMalwareProtectionPlan::CFNProtectedResourceProperty (readonly)

Information about the protected resource.

Presently, S3Bucket is the only supported protected resource.



30
31
32
# File 'guard_duty/cfn_malware_protection_plan_props.rb', line 30

def protected_resource
  @protected_resource
end

#roleString (readonly)

Amazon Resource Name (ARN) of the IAM role that includes the permissions required to scan and (optionally) add tags to the associated protected resource.

To find the ARN of your IAM role, go to the IAM console, and select the role name for details.



37
38
39
# File 'guard_duty/cfn_malware_protection_plan_props.rb', line 37

def role
  @role
end

#tagsArray<AWSCDK::GuardDuty::CfnMalwareProtectionPlan::TagItemProperty>? (readonly)

The tags to be added to the created Malware Protection plan resource.

Each tag consists of a key and an optional value, both of which you need to specify.



49
50
51
# File 'guard_duty/cfn_malware_protection_plan_props.rb', line 49

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



51
52
53
54
55
56
57
58
# File 'guard_duty/cfn_malware_protection_plan_props.rb', line 51

def self.jsii_properties
  {
    :protected_resource => "protectedResource",
    :role => "role",
    :actions => "actions",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



60
61
62
63
64
65
66
67
68
69
# File 'guard_duty/cfn_malware_protection_plan_props.rb', line 60

def to_jsii
  result = {}
  result.merge!({
    "protectedResource" => @protected_resource,
    "role" => @role,
    "actions" => @actions,
    "tags" => @tags,
  })
  result.compact
end