Class: AWSCDK::GuardDuty::CfnPublishingDestinationProps

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

Overview

Properties for defining a CfnPublishingDestination.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(destination_properties:, destination_type:, detector_id:, tags: nil) ⇒ CfnPublishingDestinationProps

Returns a new instance of CfnPublishingDestinationProps.

Parameters:



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

def initialize(destination_properties:, destination_type:, detector_id:, tags: nil)
  @destination_properties = destination_properties.is_a?(Hash) ? ::AWSCDK::GuardDuty::CfnPublishingDestination::CFNDestinationPropertiesProperty.new(**destination_properties.transform_keys(&:to_sym)) : destination_properties
  Jsii::Type.check_type(@destination_properties, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ndWFyZGR1dHkuQ2ZuUHVibGlzaGluZ0Rlc3RpbmF0aW9uLkNGTkRlc3RpbmF0aW9uUHJvcGVydGllc1Byb3BlcnR5In1dfX0=")), "destinationProperties")
  @destination_type = destination_type
  Jsii::Type.check_type(@destination_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "destinationType")
  @detector_id = detector_id
  Jsii::Type.check_type(@detector_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "detectorId")
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::GuardDuty::CfnPublishingDestination::TagItemProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19ndWFyZGR1dHkuQ2ZuUHVibGlzaGluZ0Rlc3RpbmF0aW9uLlRhZ0l0ZW1Qcm9wZXJ0eSJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
end

Instance Attribute Details

#destination_propertiesAWSCDK::IResolvable, AWSCDK::GuardDuty::CfnPublishingDestination::CFNDestinationPropertiesProperty (readonly)

Contains the Amazon Resource Name (ARN) of the resource to publish to, such as an S3 bucket, and the ARN of the KMS key to use to encrypt published findings.



28
29
30
# File 'guard_duty/cfn_publishing_destination_props.rb', line 28

def destination_properties
  @destination_properties
end

#destination_typeString (readonly)

The type of publishing destination.

GuardDuty supports Amazon S3 buckets as a publishing destination.



35
36
37
# File 'guard_duty/cfn_publishing_destination_props.rb', line 35

def destination_type
  @destination_type
end

#detector_idString (readonly)

The ID of the GuardDuty detector where the publishing destination exists.



40
41
42
# File 'guard_duty/cfn_publishing_destination_props.rb', line 40

def detector_id
  @detector_id
end

Class Method Details

.jsii_propertiesObject



47
48
49
50
51
52
53
54
# File 'guard_duty/cfn_publishing_destination_props.rb', line 47

def self.jsii_properties
  {
    :destination_properties => "destinationProperties",
    :destination_type => "destinationType",
    :detector_id => "detectorId",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



56
57
58
59
60
61
62
63
64
65
# File 'guard_duty/cfn_publishing_destination_props.rb', line 56

def to_jsii
  result = {}
  result.merge!({
    "destinationProperties" => @destination_properties,
    "destinationType" => @destination_type,
    "detectorId" => @detector_id,
    "tags" => @tags,
  })
  result.compact
end